|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ca.commons.datamodel.concurrent.ConcurrentModelClass
public final class ConcurrentModelClass
| Field Summary |
|---|
| Fields inherited from interface com.ca.commons.datamodel.DataModelItem |
|---|
NAME_DELIMITER |
| Method Summary | ||
|---|---|---|
com.ca.commons.datamodel.concurrent.ConcurrentProperty |
addMetaDataProperty(String name)
Create an empty metadata property on this item with provided name and type, if one does not already exist. |
|
ConcurrentModelClass |
clone()
|
|
String |
getAbsoluteName()
|
|
DataModelItem |
getContainer()
|
|
Collection<com.ca.commons.datamodel.concurrent.ConcurrentProperty> |
getDataModelProperties()
Lists the data model properties associated with this data model class. |
|
com.ca.commons.datamodel.concurrent.ConcurrentProperty |
getDataModelProperty(String name)
|
|
String |
getDocumentation()
|
|
List<String> |
getExtends()
Returns the names of classes that this class extends (if any). |
|
List<ConcurrentModelClass> |
getExtendsClasses()
Returns the classes that this class extends (if any). |
|
Collection<com.ca.commons.datamodel.concurrent.ConcurrentProperty> |
getMetaDataProperties()
Returns collection of DataModelPropertys describing metadata. |
|
com.ca.commons.datamodel.concurrent.ConcurrentProperty |
getMetaDataProperty(String name)
|
|
boolean |
getMetaDataPropertyBool(String boolPropName,
boolean def)
Helper function which returns boolean value for contained property with name boolPropName or
def if no such property exists. |
|
String |
getMetaDataPropertyStr(String strPropName,
String def)
Helper function which returns String value for contained property with name strPropName or
def if no such property exists. |
|
DataModel |
getModel()
|
|
String |
getName()
|
|
boolean |
isMetadata()
Classes and properties can represent datamodel or metamodel. |
|
Object |
mdObject(String mdName,
Object defaultValue)
Returns the untyped value of a metadata item. |
|
String |
mdString(String mdName,
String defaultValue)
Returns the string value of a metadata item. |
|
com.ca.commons.functional.Option<DataModelValue> |
mdValue(String mdName)
|
|
|
mdValue(String mdName,
T defaultValue)
Tries to retrieve the value of the metadata item as a particular type. |
|
|
mdValue(String mdName,
T defaultValue,
Class<? extends T> type)
Tries to retrieve the value of a metadata item as a particular type. |
|
void |
setDocumentation(String doc)
|
|
void |
setMetaDataPropertyBool(String boolPropName,
boolean b)
Helper function to ensure that the named metadata property is set to the provided value on this item. |
|
void |
setMetaDataPropertyStr(String strPropName,
String s)
Helper function to ensure that the named metadata property is set to the provided value on this item. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ca.commons.datamodel.DataModelItem |
|---|
addMetaDataProperty, getAbsoluteName, getContainer, getDocumentation, getMetaDataPropertyBool, getMetaDataPropertyStr, getModel, getName, isMetadata, setDocumentation, setMetaDataPropertyBool, setMetaDataPropertyStr |
| Methods inherited from interface com.ca.commons.datamodel.HasMetadata |
|---|
mdObject, mdString, mdValue, mdValue, mdValue |
| Method Detail |
|---|
@NotNull public ConcurrentModelClass clone()
@NotNull public Collection<com.ca.commons.datamodel.concurrent.ConcurrentProperty> getMetaDataProperties()
DataModelItemDataModelPropertys describing metadata.
getMetaDataProperties in interface DataModelItem
@Nullable
public com.ca.commons.datamodel.concurrent.ConcurrentProperty getMetaDataProperty(String name)
throws DataModelException
getMetaDataProperty in interface DataModelItemDataModelException@NotNull public Collection<com.ca.commons.datamodel.concurrent.ConcurrentProperty> getDataModelProperties()
DataModelClass
getDataModelProperties in interface DataModelClassDataModelProperty objects.
@Nullable
public com.ca.commons.datamodel.concurrent.ConcurrentProperty getDataModelProperty(String name)
throws DataModelException
getDataModelProperty in interface DataModelClassDataModelException@NotNull public List<String> getExtends()
DataModelClass
getExtends in interface DataModelClassString objects. Never null.@NotNull public List<ConcurrentModelClass> getExtendsClasses()
DataModelClass
getExtendsClasses in interface DataModelClassString objects. Never null.@NotNull public DataModel getModel()
getModel in interface DataModelItem@NotNull public final String getAbsoluteName()
getAbsoluteName in interface DataModelItem@NotNull public final String getName()
getName in interface DataModelItempublic boolean isMetadata()
DataModelItem
isMetadata in interface DataModelItem
@Nullable
public final DataModelItem getContainer()
throws DataModelException
getContainer in interface DataModelItemDataModelException@NotNull public final String getDocumentation()
getDocumentation in interface DataModelItem
public void setDocumentation(@NotNull
String doc)
setDocumentation in interface DataModelItem
@NotNull
public com.ca.commons.datamodel.concurrent.ConcurrentProperty addMetaDataProperty(@NotNull
String name)
DataModelItem
addMetaDataProperty in interface DataModelItem
public void setMetaDataPropertyBool(@NotNull
String boolPropName,
boolean b)
DataModelItem
setMetaDataPropertyBool in interface DataModelItem
@Nullable
public Object mdObject(@NotNull
String mdName,
@Nullable
Object defaultValue)
HasMetadatamdValue(mdName, defaultValue, Object.class).
mdObject in interface HasMetadatamdName - The name of the metadata item.defaultValue - A default value to return if the named item is not found.
HasMetadata.mdValue(String, Object, Class)
@Nullable
public String mdString(@NotNull
String mdName,
@Nullable
String defaultValue)
HasMetadatamdValue(mdName, defaultValue, String.class).
mdString in interface HasMetadatamdName - The name of the metadata item.defaultValue - A default value to return if the named item is
not found, or its value is not a string.
HasMetadata.mdValue(String, Object, Class)
@NotNull
public <T> T mdValue(@NotNull
String mdName,
@NotNull
T defaultValue)
HasMetadatamdValue(mdName, defaultValue, defaultValue.getClass()).
mdValue in interface HasMetadatamdName - The name of the metadata item to retrieve.defaultValue - The default value to return if the metadata item
cannot be retrieved. Also indicates the type of value expected
by the caller.
HasMetadata.mdValue(String, Object, Class)
@Nullable
public <T> T mdValue(@NotNull
String mdName,
@Nullable
T defaultValue,
@NotNull
Class<? extends T> type)
HasMetadata
mdValue in interface HasMetadatamdName - The name of the metadata item to retrieve.defaultValue - The default value to return if the metadata item
cannot be retrieved.type - A class object indicating the type of the value that
is expected.
type.isInstance(returnedValue)
is always true.
@NotNull
public com.ca.commons.functional.Option<DataModelValue> mdValue(@NotNull
String mdName)
mdValue in interface HasMetadatapublic String toString()
toString in class Object
public final boolean getMetaDataPropertyBool(String boolPropName,
boolean def)
DataModelItemboolPropName or
def if no such property exists.
getMetaDataPropertyBool in interface DataModelItem
public String getMetaDataPropertyStr(String strPropName,
String def)
DataModelItemstrPropName or
def if no such property exists.
getMetaDataPropertyStr in interface DataModelItem
public void setMetaDataPropertyStr(String strPropName,
String s)
DataModelItem
setMetaDataPropertyStr in interface DataModelItem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||