Package org.synchronoss.cpo.core.meta
Interface CpoMetaAdapter
- All Known Implementing Classes:
AbstractCpoMetaAdapter,CpoMetaDescriptor
public interface CpoMetaAdapter
CpoMetaAdapter is the datastore-agnostic view over a loaded CPO metadata source: it
resolves the CpoClass for a given bean, exposes the classes it knows about, and bridges
between the datastore's native data type names/ids and their Java equivalents via the
implementation's DataTypeMapper.- Author:
- dberry
-
Method Summary
Modifier and TypeMethodDescriptionGets the names of all native data types this meta adapter knows how to map.Returns a list of the cpo class objects that the meta adapter is aware of.intgetDataTypeInt(String dataTypeName) Gets the integer identifier for a named native data type.Class<?> getDataTypeJavaClass(CpoAttribute attribute) Gets the Java class that the given attribute's native data type maps to.getDataTypeMapEntry(int dataTypeInt) Gets the full data type mapping entry for a given native data type identifier.getDataTypeName(CpoAttribute attribute) Gets the Java class name that the given attribute's native data type maps to.Gets the parser used to extract bind-marker/column information from this metadata source's native function expressions.<T> CpoClassgetMetaClass(T bean) Returns the metadata for the class that is contained within the metadata source
-
Method Details
-
getMetaClass
Returns the metadata for the class that is contained within the metadata source- Type Parameters:
T- The bean Type- Parameters:
bean- The java bean whose metaclass is needed- Returns:
- the
CpoClassmetadata forbean's class - Throws:
CpoException- Thrown if there are errors accessing the datasource
-
getCpoClasses
Returns a list of the cpo class objects that the meta adapter is aware of.- Returns:
- java.util.List of CpoClass
- Throws:
CpoException- Thrown if there are errors accessing the datasource
-
getExpressionParser
Gets the parser used to extract bind-marker/column information from this metadata source's native function expressions.- Returns:
- the expression parser for this meta adapter
- Throws:
CpoException- if the parser cannot be created
-
getDataTypeName
Gets the Java class name that the given attribute's native data type maps to.- Parameters:
attribute- the attribute whose data type is being resolved- Returns:
- the fully-qualified Java class name (array types are reported as
byte[]orchar[]) - Throws:
CpoException- if the data type cannot be resolved
-
getDataTypeJavaClass
Gets the Java class that the given attribute's native data type maps to.- Parameters:
attribute- the attribute whose data type is being resolved- Returns:
- the Java class the attribute's value is represented as
- Throws:
CpoException- if the data type cannot be resolved
-
getDataTypeInt
Gets the integer identifier for a named native data type.- Parameters:
dataTypeName- the native data type name- Returns:
- the integer identifier registered for
dataTypeName - Throws:
CpoException- if the data type name is not recognized
-
getDataTypeMapEntry
Gets the full data type mapping entry for a given native data type identifier.- Parameters:
dataTypeInt- the integer identifier of the native data type- Returns:
- the
DataTypeMapEntryregistered fordataTypeInt - Throws:
CpoException- if the data type identifier is not recognized
-
getAllowableDataTypes
Gets the names of all native data types this meta adapter knows how to map.- Returns:
- the list of allowable native data type names
- Throws:
CpoException- if the data types cannot be retrieved
-