|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.soyatec.windows.azure.table.AzureTable
public abstract class AzureTable
API entry point for using structured storage.
The underlying usage pattern is designed to be similar to the one used in blob and queue services in this library.AzureTable implements the BatchStorage. Some TRANSCATION
supported operations can be enlist a single batch operation. Example:
SampleEntity sampleEntity1 = createSampleEntity();
SampleEntity sampleEntity2 = createSampleEntity();
try {
table.startBatch();
table.insertEntity(sampleEntity1);
table.insertEntity(sampleEntity2);
table.executeBatch();
catch(Exception e){
//
}
For more detail about Batch operation, see
BatchStorage.
| Field Summary |
|---|
| Fields inherited from interface org.soyatec.windows.azure.table.BatchStorage |
|---|
BATCH_BOUNDARY_PREFIX, BATCH_PATH, CHANGESET_BOUNDARY_PREFIX |
| Method Summary | ||
|---|---|---|
abstract void |
createTable()
Creates a new table in the service |
|
abstract void |
deleteEntity(TableStorageEntity obj)
Deletes an entity within a table |
|
abstract void |
deleteEntityIfNotModified(TableStorageEntity obj)
Deletes a table entity if the entity is not modified after it is loaded from azure table storage. |
|
abstract void |
deleteTable()
Deletes a table from the service. |
|
abstract boolean |
doesTableExist()
Checks whether a table with the same name already exists. |
|
java.lang.String |
getAccountName()
Get the name of the storage account |
|
java.net.URI |
getBaseUri()
Get the base uri of the table service |
|
java.lang.Class<? extends TableStorageEntity> |
getModelClass()
Get the model class for this table. |
|
RetryPolicy |
getRetryPolicy()
Get the retry policy used for retrying requests |
|
java.lang.String |
getTableName()
Get the name of specified table. |
|
TimeSpan |
getTimeout()
Get the timeout per requeet |
|
abstract void |
insertEntity(TableStorageEntity obj)
Inserts a new entity into a table. |
|
boolean |
isUsePathStyleUris()
Whether use/generate path-style or host-style URIs |
|
abstract
|
loadEntity(T entity)
Load the entity within table by the entity identifier(PartitionKey and RowKey). |
|
abstract void |
mergeEntity(TableStorageEntity obj)
Merges table entity |
|
abstract java.util.List<TableStorageEntity> |
retrieveEntities()
This operation queries entities in a table. |
|
abstract java.util.List<TableStorageEntity> |
retrieveEntities(java.lang.String queryExpression)
This operation queries entities in a table. |
|
abstract java.util.List<TableStorageEntity> |
retrieveEntitiesByKey(java.lang.String partitionKey,
java.lang.String rowKey)
|
|
void |
setModelClass(java.lang.Class<? extends TableStorageEntity> modelClass)
Set model class for this table. |
|
void |
setRetryPolicy(RetryPolicy retryPolicy)
Set the RetryPolicy userd for retrying requests |
|
void |
setTimeout(TimeSpan timeout)
Set timeout per request |
|
abstract void |
updateEntity(TableStorageEntity obj)
Updates an existing entity within a table by replacing it. |
|
abstract void |
updateEntityIfNotModified(TableStorageEntity obj)
Updates table entity if the entity is not modified after it is loaded from azure table storage. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.soyatec.windows.azure.table.BatchStorage |
|---|
clearBatch, executeBatch, isInBatch, startBatch |
| Method Detail |
|---|
public abstract void createTable()
public abstract boolean doesTableExist()
public abstract void deleteTable()
tableName - The name of the table to be deleted
public abstract void insertEntity(TableStorageEntity obj)
throws StorageException
obj - The object to be inserted. The entity shoule be instance of
TableStorageEntity or subclass of
TableStorageEntity
StorageException
public abstract void updateEntity(TableStorageEntity obj)
throws StorageException
obj - the object to be updated
StorageException
public abstract void updateEntityIfNotModified(TableStorageEntity obj)
throws StorageException
obj - the object to be updated
StorageException#updateEntity(TableStorageEntity)}
public abstract void mergeEntity(TableStorageEntity obj)
throws StorageException
obj - the object to be merged
StorageException
public abstract void deleteEntity(TableStorageEntity obj)
throws StorageException
obj - the object to be deleted
StorageException - If entity is not exists, an exception is also thrown.
public abstract void deleteEntityIfNotModified(TableStorageEntity obj)
throws StorageException
obj - the object to be deleted
StorageException#deleteEntity(TableStorageEntity)}
public abstract <T extends TableStorageEntity> T loadEntity(T entity)
throws StorageException
T - TableStorageEntity instance of subclass of
TableStorageEntity instanceentity - Specified Entity
StorageException
public abstract java.util.List<TableStorageEntity> retrieveEntities(java.lang.String queryExpression)
throws StorageException
queryExpression - If queryExpression is not given, all rows are return.
StorageException
public abstract java.util.List<TableStorageEntity> retrieveEntities()
throws StorageException
StorageException
public abstract java.util.List<TableStorageEntity> retrieveEntitiesByKey(java.lang.String partitionKey,
java.lang.String rowKey)
throws StorageException
partitionKey - rowKey -
StorageExceptionpublic java.net.URI getBaseUri()
public java.lang.String getAccountName()
public java.lang.String getTableName()
public boolean isUsePathStyleUris()
public TimeSpan getTimeout()
public RetryPolicy getRetryPolicy()
public void setTimeout(TimeSpan timeout)
timeout - public void setRetryPolicy(RetryPolicy retryPolicy)
RetryPolicy userd for retrying requests
retryPolicy - public java.lang.Class<? extends TableStorageEntity> getModelClass()
modelClasspublic void setModelClass(java.lang.Class<? extends TableStorageEntity> modelClass)
modelClass - #modelClass}
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||