Update
Siminov Framework edited this page Jan 17, 2016
·
12 revisions
public final void update() throws DatabaseException;
Book c = new Book();
c.setTitle(Book.BOOK_TYPE_C);
c.setDescription(applicationContext.getString(R.string.c_description));
c.setAuthor(applicationContext.getString(R.string.c_author));
c.setLink(applicationContext.getString(R.string.c_link));
try {
c.update();
} catch(DatabaseException de) {
//Log it.
}
- (void)update;
Book *c = [[Book alloc] init];
[c setTitle:[Book BOOK_TYPE_C]];
[c setDescription:@"c_description"];
[c setHistory:@"c_author"];
[c setLink:@"c_link"];
@try {
[c update];
} @catch(SICDatabaseException *databaseException) {
//Log it.
}
public void Update();
Book c = new Book();
c.SetTitle(Book.BOOK_TYPE_C);
c.SetDescription("c_description");
c.SetHistory("c_author");
c.SetLink("c_link");
try
{
c.Update();
}
catch(DatabaseException de)
{
//Log it.
}
- this.update = function() {};
- this.updateAsync = function(callback, transaction) {};
/** Update Sample **/
var c = new Book();
c.setTitle(Book.BOOK_TYPE_C);
c.setDescription("c_description");
c.setAuthor("c_author");
c.setLink("c_link");
try {
c.update();
} catch(DatabaseException de) {
//Log it.
}
/** Update Async Sample **/
var c = new Book();
c.setTitle(Book.BOOK_TYPE_C);
c.setDescription("c_description");
c.setAuthor("c_author");
c.setLink("c_link");
var callback = new Callback();
callback.onSuccess = function() {
}
c.updateAsync(callback);
/** Update Async Transaction Sample **/
var c = new Book();
c.setTitle(Book.BOOK_TYPE_C);
c.setDescription("c_description");
c.setAuthor("c_author");
c.setLink("c_link");
var callback = new Callback();
callback.onExecute = function(transaction) {
var updateCallback = new Callback();
updateCallback.onSuccess = function() {
}
c.updateAsync(updateCallback, transaction);
}
callback.onSuccess = function() {
}
var databaseDescriptor = c.getDatabaseDescriptor();
Database.beginTransactionAsync(databaseDescriptor, callback);