public class DataModel extends AbstractAsset implements IDataModel
Constructor and Description |
---|
DataModel() |
DataModel(String name,
String schemaName) |
DataModel(String name,
String schemaName,
List<IProperty> properties) |
DataModel(String name,
String schemaName,
List<IProperty> properties,
List<Relationship> relationships) |
Modifier and Type | Method and Description |
---|---|
void |
addAssociation(PropertyType associationType,
String name,
IDataModel dataModel)
Add the associated datamodel
|
void |
addProperties(List<IProperty> addProperties) |
void |
addProperty(IProperty property)
Add property to data model
|
String |
getId()
Gets the identifier of this Asset
|
IProperty[] |
getPrimaryKeys()
Gets the properties of this datamodel that are known to be primary keys.
|
List<IProperty> |
getProperties()
Gets the properties of this datamodel.
|
IProperty |
getPropertyByName(String propertyName)
Convenience method for retrieving a property by it's name.
|
String[] |
getPropertyNames()
Gets the names of this datamodel's properties.
|
List<Relationship> |
getRelationships() |
List<Relationship> |
getRelationships(IDataModel otherDataModel)
Gets relationships between this dataModel and another dataModel.
|
String[] |
getRequired() |
String |
getSchemaName()
Gets the name of schema in which this datamodel resides in.
|
boolean |
isBinaryEntity() |
boolean |
isDefaultBinaryEntity() |
boolean |
isGenericOperationAllowed()
Flag represents whether this entity can be bind with generic operations
|
boolean |
isRootEntity()
RootEntity is true if it is either an argument or return type of an operation
|
void |
setBinaryEntity(boolean binaryEntity) |
void |
setDefaultBinaryEntity(boolean defaultBinaryEntity) |
void |
setGenericOperationAllowed(boolean genericOperationAllowed)
Set true if generic operations are allowed in this dataModel.
|
void |
setId(String id) |
void |
setProperties(List<? extends IProperty> properties)
Sets the properties of this datamodel.
|
void |
setRelationships(List<Relationship> relationships) |
void |
setRequired(String[] required) |
void |
setRootEntity(boolean value) |
void |
setSchemaName(String schemaName) |
getDescription, getName, getTitle, setDescription, setName, setTitle
getDescription, getName, getTitle
public String getId()
AbstractAsset
getId
in interface IAsset
getId
in class AbstractAsset
public void setId(String id)
setId
in class AbstractAsset
public String[] getRequired()
public void setRequired(String[] required)
public String getSchemaName()
getSchemaName
in interface IDataModel
public void setSchemaName(String schemaName)
public List<IProperty> getProperties()
getProperties
in interface IDataModel
public void setProperties(List<? extends IProperty> properties)
setProperties
in interface IDataModel
properties
- the properties of this datamodel.public List<Relationship> getRelationships()
public List<Relationship> getRelationships(IDataModel otherDataModel)
getRelationships
in interface IDataModel
otherDataModel
- another datamodel for which to find relationships to and from.public boolean isRootEntity()
IDataModel
isRootEntity
in interface IDataModel
public void setRootEntity(boolean value)
setRootEntity
in interface IDataModel
public void setRelationships(List<Relationship> relationships)
public String[] getPropertyNames()
public IProperty getPropertyByName(String propertyName)
propertyName
- the name of the property to retrievepublic IProperty[] getPrimaryKeys()
IProperty.isPrimaryKey()
.public void addProperty(IProperty property)
property
- public void addAssociation(PropertyType associationType, String name, IDataModel dataModel) throws DermisException
associationType
- association type either COLLECTION or OBJECTname
- name of the propertydataModel
- associated data modelDermisException
public boolean isBinaryEntity()
isBinaryEntity
in interface IDataModel
public void setBinaryEntity(boolean binaryEntity)
setBinaryEntity
in interface IDataModel
public boolean isDefaultBinaryEntity()
isDefaultBinaryEntity
in interface IDataModel
public void setDefaultBinaryEntity(boolean defaultBinaryEntity)
setDefaultBinaryEntity
in interface IDataModel
public boolean isGenericOperationAllowed()
isGenericOperationAllowed
in interface IDataModel
public void setGenericOperationAllowed(boolean genericOperationAllowed)
genericOperationAllowed
- Copyright © 1982–2022 Adobe Systems Inc.. All rights reserved.