public class DataConfig
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DataConfig.DataEntity
This class contains metadata for an attributeColumn entry.
|
static class |
DataConfig.DataEntityMetadata
This class contains public and private metadata for an entity.
|
static class |
DataConfig.DataEntityWithRelationships |
static class |
DataConfig.DataType |
static class |
DataConfig.EntityHierarchyInfo |
static class |
DataConfig.EntityType |
static class |
DataConfig.PrivateMetadata |
static class |
DataConfig.PublicMetadata |
static class |
DataConfig.Relationship
Represents a parent-child relationship between two entities.
|
static class |
DataConfig.RelationshipList
An ordered List of Relationship objects which adds two functions: getChildIds() and getParentIds().
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_ENTITY_REQUEST_COUNT
This is a recommended maximum number of entities a remote user should be able to request at a time.
|
static int |
NULL |
Constructor and Description |
---|
DataConfig(ConnectionConfig connectionConfig) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<java.lang.Integer> |
buildHierarchy(int parentId,
int childId,
int insertAtIndex)
Adds a copy of an existing child to a parent.
|
void |
flushInserts() |
java.util.List<java.lang.Integer> |
getChildIds(int id)
Shortcut for getRelationships(Arrays.asList(id)).getChildIds(id).
|
java.util.Collection<DataConfig.DataEntity> |
getEntities(java.util.Collection<java.lang.Integer> ids,
boolean includePrivateMetadata) |
DataConfig.DataEntityWithRelationships[] |
getEntitiesWithRelationships(int[] ids,
boolean includePrivateMetadata) |
DataConfig.DataEntity |
getEntity(int id) |
DataConfig.EntityHierarchyInfo[] |
getEntityHierarchyInfo(java.util.Map<java.lang.String,java.lang.String> publicMetadata) |
java.util.Map<java.lang.Integer,java.lang.String> |
getEntityTypes(java.util.Collection<java.lang.Integer> ids) |
java.util.List<java.lang.Integer> |
getParentIds(int id)
Shortcut for getRelationships(Arrays.asList(id)).getParentIds(id).
|
DataConfig.RelationshipList |
getRelationships(java.util.Collection<java.lang.Integer> ids)
Gets a list of parent-child relationships for a set of entities.
|
java.util.Collection<java.lang.String> |
getUniquePublicValues(java.lang.String property) |
boolean |
isEmpty() |
int |
newEntity(DataConfig.DataEntityMetadata properties,
int parent_id,
int insert_at_index)
Creates a new entity and adds it as a child of another entity.
|
void |
removeChild(int parent_id,
int child_id) |
java.util.Collection<java.lang.Integer> |
removeEntities(java.util.Collection<java.lang.Integer> ids)
Removes entities.
|
java.util.Collection<java.lang.Integer> |
searchPrivateMetadata(java.util.Map<java.lang.String,java.lang.String> privateMetadata,
java.lang.String[] wildcardFields)
Gets an Array of entity IDs with matching public metadata.
|
java.util.Collection<java.lang.Integer> |
searchPublicMetadata(java.util.Map<java.lang.String,java.lang.String> publicMetadata,
java.lang.String[] wildcardFields)
Gets an Array of entity IDs with matching public metadata.
|
void |
updateEntity(int id,
DataConfig.DataEntityMetadata diff) |
public static final int MAX_ENTITY_REQUEST_COUNT
public static final int NULL
public DataConfig(ConnectionConfig connectionConfig) throws java.rmi.RemoteException
java.rmi.RemoteException
public boolean isEmpty() throws java.rmi.RemoteException
java.rmi.RemoteException
public void flushInserts() throws java.rmi.RemoteException
java.rmi.RemoteException
public int newEntity(DataConfig.DataEntityMetadata properties, int parent_id, int insert_at_index) throws java.rmi.RemoteException
properties
- Metadata for the new entity.parent_id
- The ID of the parent entity to which the new entity should be added as a child, or NULL for no parent.insert_at_index
- The new entity's child index, or NULL to add it to the end.java.rmi.RemoteException
public java.util.Collection<java.lang.Integer> removeEntities(java.util.Collection<java.lang.Integer> ids) throws java.rmi.RemoteException
ids
- A list of IDs specifying entities to remove.java.rmi.RemoteException
public void updateEntity(int id, DataConfig.DataEntityMetadata diff) throws java.rmi.RemoteException
id
- The id of an existing entity.diff
- The properties to set.java.rmi.RemoteException
public java.util.Collection<java.lang.Integer> searchPublicMetadata(java.util.Map<java.lang.String,java.lang.String> publicMetadata, java.lang.String[] wildcardFields) throws java.rmi.RemoteException
publicMetadata
- Public metadata to search for.wildcardFields
- A list of field names in publicMetadata that should be treated
as search strings with wildcards '?' and '*' for single-character
and multi-character matching, respectively.java.rmi.RemoteException
public java.util.Collection<java.lang.Integer> searchPrivateMetadata(java.util.Map<java.lang.String,java.lang.String> privateMetadata, java.lang.String[] wildcardFields) throws java.rmi.RemoteException
privateMetadata
- Public metadata to search for.wildcardFields
- A list of field names in publicMetadata that should be treated
as search strings with wildcards '?' and '*' for single-character
and multi-character matching, respectively.java.rmi.RemoteException
public DataConfig.DataEntity getEntity(int id) throws java.rmi.RemoteException
java.rmi.RemoteException
public java.util.Collection<DataConfig.DataEntity> getEntities(java.util.Collection<java.lang.Integer> ids, boolean includePrivateMetadata) throws java.rmi.RemoteException
ids
- A collection of entity ids.includePrivateMetadata
- Set this to true to include private metadata in the results.java.rmi.RemoteException
public DataConfig.DataEntityWithRelationships[] getEntitiesWithRelationships(int[] ids, boolean includePrivateMetadata) throws java.rmi.RemoteException
java.rmi.RemoteException
public java.util.Collection<java.lang.Integer> buildHierarchy(int parentId, int childId, int insertAtIndex) throws java.rmi.RemoteException
parentId
- An existing parent to add a child hierarchy to.childId
- An existing child to copy the hierarchy of.insertAtIndex
- Identifies a child of the parent to insert the new child before.java.rmi.RemoteException
public void removeChild(int parent_id, int child_id) throws java.rmi.RemoteException
java.rmi.RemoteException
public java.util.Map<java.lang.Integer,java.lang.String> getEntityTypes(java.util.Collection<java.lang.Integer> ids) throws java.rmi.RemoteException
java.rmi.RemoteException
public java.util.List<java.lang.Integer> getParentIds(int id) throws java.rmi.RemoteException
java.rmi.RemoteException
getRelationships(Collection)
public java.util.List<java.lang.Integer> getChildIds(int id) throws java.rmi.RemoteException
java.rmi.RemoteException
getRelationships(Collection)
public DataConfig.RelationshipList getRelationships(java.util.Collection<java.lang.Integer> ids) throws java.rmi.RemoteException
ids
- A collection of entity IDs.java.rmi.RemoteException
public java.util.Collection<java.lang.String> getUniquePublicValues(java.lang.String property) throws java.rmi.RemoteException
java.rmi.RemoteException
public DataConfig.EntityHierarchyInfo[] getEntityHierarchyInfo(java.util.Map<java.lang.String,java.lang.String> publicMetadata) throws java.rmi.RemoteException
java.rmi.RemoteException