Skip to content

Get Entity Descriptor

Siminov Framework edited this page Jan 17, 2016 · 8 revisions

Get Entity Descriptor

Android API: Get Entity Descriptor

    public final EntityDescriptor getEntityDescriptor() throws DatabaseException;
  • Android Sample: Get Entity Descriptor
    EntityDescriptor entityDescriptor = null;
    try {
        entityDescriptor = new Book().getEntityDescriptor();
    } catch(DatabaseException de) {
		//Log it.
    }

iOS API: Get Entity Descriptor

    - (SICEntityDescriptor *)getEntityDescriptor;
  • iOS Sample: Get Entity Descriptor
    SICEntityDescriptor *entityDescriptor = nil;
    @try {
        entityDescriptor = [[[Book alloc] init] getEntityDescriptor];
    } @catch(SICDatabaseException *databaseException) {
		//Log it.
    }

Windows API: Get Entity Descriptor

    public EntityDescriptor GetEntityDescriptor();
  • Windows Sample: Get Entity Descriptor
    EntityDescriptor entityDescriptor = null;
    try 
    {
        entityDescriptor = new Book().GetEntityDescriptor();
    } 
    catch(DatabaseException de) 
    {
		//Log it.
    }

JavaScript API: Get Entity Descriptor

    - this.getEntityDescriptor = function() {}
    - this.getEntityDescriptorAsync = function(callback, transaction) {}
  • JavaScript Sample: Get Entity Descriptor
            /** Get Entity Descriptor Sample **/

    var entityDescriptor = null;
    try 
    {
        entityDescriptor = new Book().getEntityDescriptor();
    } 
    catch(de) 
    {
		//Log it.
    }
            /** Entity Descriptor Async Sample **/

    var callback = new Callback();
    callback.onSuccess = function(entityDescriptor) {

    }

    new Book().getEntityDescriptorAsync(callback);
            /** Entity Descriptor Async Transaction Sample **/

    var callback = new Callback();
    callback.onExecute = function(transaction) {

        var entityDescriptorCallback = new Callback();
        entityDescriptorCallback.onSuccess = function() {

        }

        new Book().getEntityDescriptorAsync(entityDescriptorCallback, transaction);
    }

    callback.onSuccess = function() {

    }

    var databaseDescriptor = new Lession().getDatabaseDescriptor();
    Database.beginTransactionAsync(databaseDescriptor, callback);