|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Deprecated public interface LegacyDataAdapter
Adapter that supports "legacy" KNS/KRAD persistence, metadata, and object utility frameworks via runtime argument inspection
Method Summary | ||
---|---|---|
boolean |
allForeignKeyValuesPopulatedForReference(Object bo,
String referenceName)
Deprecated. This method examines whether all the foreign key fields for the specified reference contain values. |
|
boolean |
allPrimaryKeyValuesPresentAndNotWildcard(Class<?> boClass,
Map<String,String> formProps)
Deprecated. |
|
boolean |
areNotesSupported(Class<?> dataObjectClass)
Deprecated. |
|
Object |
createNewObjectFromClass(Class clazz)
Deprecated. This method safely creates a object from a class Convenience method to create new object and throw a runtime exception if it cannot If the class is an ExternalizableBusinessObject , this method will determine the interface for the EBO and
query the
appropriate module service to create a new instance. |
|
RemotableQuickFinder.Builder |
createQuickFinder(Class<?> containingClass,
String attributeName)
Deprecated. Returns the builder for a remotable quick finder for the given attribute name on the given containing class. |
|
void |
delete(Object dataObject)
Deprecated. Deletes a data object from the database. |
|
void |
deleteMatching(Class<?> clazz,
Map<String,?> fieldValues)
Deprecated. Deletes data objects from the database. |
|
Class<?> |
determineCollectionObjectType(Class<?> containingClass,
String collectionPropertyName)
Deprecated. Determines the type of the collection object on the class with the collection with the given property name. |
|
boolean |
equalsByPrimaryKeys(Object do1,
Object do2)
Deprecated. Compares two dataObject instances for equality based on primary keys |
|
|
findAll(Class<T> clazz)
Deprecated. This method retrieves a collection of data objects populated with data, such that each record in the database populates a new object instance.This will only retrieve business objects by class type. |
|
|
findByDocumentHeaderId(Class<T> documentClass,
String id)
Deprecated. Finds the Document for the specified class with the given id. |
|
|
findByDocumentHeaderIds(Class<T> documentClass,
List<String> ids)
Deprecated. Finds the Documents for the specified class with the given list of ids. |
|
|
findByPrimaryKey(Class<T> clazz,
Map<String,?> primaryKeys)
Deprecated. Retrieves an object instance identified by its primary keys and values. |
|
|
findBySinglePrimaryKey(Class<T> clazz,
Object primaryKey)
Deprecated. Retrieves an object instance identified by its primary key. |
|
|
findCollectionBySearchHelper(Class<T> clazz,
Map<String,String> formProps,
boolean unbounded,
boolean allPrimaryKeyValuesPresentAndNotWildcard,
Integer searchResultsLimit)
Deprecated. please use findCollectionBySearchHelper(Class, java.util.Map, java.util.List, boolean, boolean, Integer) instead |
|
|
findCollectionBySearchHelper(Class<T> clazz,
Map<String,String> formProps,
List<String> wildcardAsLiteralPropertyNames,
boolean unbounded,
boolean allPrimaryKeyValuesPresentAndNotWildcard,
Integer searchResultsLimit)
Deprecated. Returns a collection of objects based on the given search parameters. |
|
|
findMatching(Class<T> clazz,
Map<String,?> fieldValues)
Deprecated. This method retrieves a collection of data objects populated with data, such that each record in the database populates a new object instance. |
|
|
findMatchingOrderBy(Class<T> clazz,
Map<String,?> fieldValues,
String sortField,
boolean sortAscending)
Deprecated. This method retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. |
|
|
findObjectBySearch(Class<T> clazz,
Map<String,String> formProps)
Deprecated. Retrieves a Object based on the search criteria, which should uniquely identify a record. |
|
String |
getDataObjectIdentifierString(Object dataObject)
Deprecated. Gets the identifier for a data object |
|
DataObjectRelationship |
getDataObjectRelationship(Object dataObject,
Class<?> dataObjectClass,
String attributeName,
String attributePrefix,
boolean keysOnly,
boolean supportsLookup,
boolean supportsInquiry)
Deprecated. Attempts to find a relationship for the given attribute within the given data object |
|
RelationshipDefinition |
getDictionaryRelationship(Class<?> c,
String attributeName)
Deprecated. |
|
PersistableBusinessObjectExtension |
getExtension(Class<? extends PersistableBusinessObject> businessObjectClass)
Deprecated. Creates an instance of the extension for the given business object class. |
|
Class<?> |
getExtensionAttributeClass(Class<?> boClass,
String attributePropertyName)
Deprecated. |
|
ForeignKeyFieldsPopulationState |
getForeignKeyFieldsPopulationState(Object bo,
String referenceName)
Deprecated. This method checks the foreign keys for a reference on a given BO, and tests that all fk fields are populated if any are populated. |
|
Map<String,String> |
getForeignKeysForReference(Class<?> clazz,
String attributeName)
Deprecated. This method will return a Map of all the foreign key fields and the corresponding primary key fields for a given reference. |
|
Class<?> |
getInquiryObjectClassIfNotTitle(Object dataObject,
String propertyName)
Deprecated. Get Inquiry class if not the title attribute |
|
Map<String,String> |
getInquiryParameters(Object dataObject,
List<String> keys,
String propertyName)
Deprecated. Get Inquiry parameters for given keys for data object/property name |
|
Object |
getNestedValue(Object bo,
String fieldName)
Deprecated. This method safely extracts either simple values OR nested values. |
|
Map<String,?> |
getPrimaryKeyFieldValues(Object dataObject)
Deprecated. This method retrieves the primary key field values for the given data object |
|
Map<String,?> |
getPrimaryKeyFieldValuesDOMDS(Object dataObject)
Deprecated. Determines the primary keys for the class of the given object, then for each key field retrieves the value from the object instance and populates the return map with the primary key name as the map key and the object value as the map value |
|
Class<?> |
getPropertyType(Object object,
String propertyName)
Deprecated. Returns the type of the property with the given name on the supplied object. |
|
Object |
getReferenceIfExists(Object bo,
String referenceName)
Deprecated. This method attempts to retrieve the reference from a BO if it exists. |
|
String |
getTitleAttribute(Class<?> dataObjectClass)
Deprecated. This method gets the title attribute from the datadictionary for the given data object class |
|
boolean |
hasCollection(Class<?> boClass,
String collectionName)
Deprecated. Returns whether BOs of the given class have a collection defined within them with the given collection name. |
|
boolean |
hasLocalInquiry(Class<?> dataObjectClass)
Deprecated. Determines whether the given data object class has an associated inquiry in the local running application |
|
boolean |
hasLocalLookup(Class<?> dataObjectClass)
Deprecated. Determines whether the given data object class has an associated lookup in the local running application |
|
boolean |
hasPrimaryKeyFieldValues(Object persistableObject)
Deprecated. |
|
boolean |
hasReference(Class<?> boClass,
String referenceName)
Deprecated. Returns whether there is a reference defined in the persistence layer with the given name. |
|
boolean |
isCollectionUpdatable(Class<?> boClass,
String collectionName)
Deprecated. |
|
boolean |
isExtensionAttribute(Class<?> boClass,
String attributePropertyName,
Class<?> propertyType)
Deprecated. |
|
boolean |
isLockable(Object object)
Deprecated. Determines if the given ojbect is "lockable". |
|
boolean |
isNull(Object object)
Deprecated. This method is a OJB Proxy-safe way to test for null on a proxied object that may or may not be materialized yet. |
|
boolean |
isPersistable(Class<?> dataObjectClass)
Deprecated. Determines if a class is persistable |
|
boolean |
isProxied(Object object)
Deprecated. Returns whether the object is an ORM proxy |
|
boolean |
isReferenceUpdatable(Class<?> boClass,
String referenceName)
Deprecated. |
|
|
linkAndSave(T dataObject)
Deprecated. Links up any contained objects, and then saves the passed in object via the persistence layer. |
|
Map<String,Class> |
listCollectionObjectTypes(Class<?> boClass)
Deprecated. |
|
List<String> |
listPrimaryKeyFieldNames(Class<?> clazz)
Deprecated. Returns a list of primary key field names for the given class. |
|
Map<String,Class> |
listReferenceObjectFields(Class<?> boClass)
Deprecated. This method uses the persistence layer to determine the list of reference objects contained within this parent object. |
|
void |
materializeAllSubObjects(Object object)
Deprecated. Materializes any references on the given object. |
|
Class<?> |
materializeClassForProxiedObject(Object object)
Deprecated. Attempts to find the Class for the given potentially proxied object |
|
void |
refreshAllNonUpdatingReferences(Object persistableObject)
Deprecated. This method refreshes all reference objects to this main object that are 'non-updateable'. |
|
void |
refreshReferenceObject(PersistableBusinessObject businessObject,
String referenceObjectName)
Deprecated. Refreshes the specified reference object on the given business object. |
|
Object |
resolveProxy(Object o)
Deprecated. Returns the object underlying any ORM proxy layers |
|
|
retrieve(T dataObject)
Deprecated. Retrieves an object instance identified by the class of the given object and the object's primary key values. |
|
void |
retrieveNonKeyFields(Object persistableObject)
Deprecated. |
|
void |
retrieveReferenceObject(Object persistableObject,
String referenceObjectName)
Deprecated. |
|
|
save(T dataObject)
Deprecated. Saves the passed in object or list of objects via the persistence layer. |
|
|
saveDocument(T document)
Deprecated. |
|
void |
setObjectProperty(Object bo,
String propertyName,
Class propertyType,
Object propertyValue)
Deprecated. Sets the property of an object with the given value. |
|
void |
setObjectPropertyDeep(Object bo,
String propertyName,
Class<?> type,
Object propertyValue)
Deprecated. Recursive; sets all occurences of the property in the object, its nested objects and its object lists with the given value. |
|
PersistableBusinessObject |
toPersistableBusinessObject(Object object)
Deprecated. Casts the given object to a PersistableBusinessObject, checking first whether or not it is a valid PersistableBusinessObject. |
|
void |
verifyVersionNumber(Object dataObject)
Deprecated. Verifies that the version number of the given data object (if it has one) matches what is currently in the database. |
Method Detail |
---|
<T> T save(T dataObject)
dataObject
- the data object to save<T> T linkAndSave(T dataObject)
dataObject
- the data object to link and save<T> T saveDocument(T document)
<T> T findBySinglePrimaryKey(Class<T> clazz, Object primaryKey)
findByPrimaryKey(Class, Map)
clazz
- data object type classprimaryKey
- the primary key object
<T> T findByPrimaryKey(Class<T> clazz, Map<String,?> primaryKeys)
clazz
- data object type classprimaryKeys
- map of String->Object key values
void delete(Object dataObject)
dataObject
- the data object to deletevoid deleteMatching(Class<?> clazz, Map<String,?> fieldValues)
clazz
- the entity type to deletefieldValues
- map String->Object of field values to match<T> T retrieve(T dataObject)
dataObject
- the data object
<T> Collection<T> findAll(Class<T> clazz)
clazz
- the data object type class
<T> Collection<T> findMatching(Class<T> clazz, Map<String,?> fieldValues)
clazz
- the data object type classfieldValues
- map String->Object of field values
<T> Collection<T> findMatchingOrderBy(Class<T> clazz, Map<String,?> fieldValues, String sortField, boolean sortAscending)
clazz
- fieldValues
-
Map<String,?> getPrimaryKeyFieldValues(Object dataObject)
dataObject
- data object whose primary key field name,value pairs you want
IllegalArgumentException
- if the given Object is null
ClassNotPersistableException
- if the given object is of a type not mapped in ORMvoid retrieveNonKeyFields(Object persistableObject)
persistableObject
- object whose objects need to be filled in based on primary keys
IllegalArgumentException
- if the given Object is null
ClassNotPersistableException
- if the given object is of a type not described in the OJB repositoryvoid retrieveReferenceObject(Object persistableObject, String referenceObjectName)
persistableObject
- object whose specified reference object needs to be filled in based on primary keysreferenceObjectName
- the name of the reference object that will be filled in based on primary key values
IllegalArgumentException
- if the given Object is null
ClassNotPersistableException
- if the given object is of a type not described in the OJB repositoryvoid refreshAllNonUpdatingReferences(Object persistableObject)
persistableObject
- - the businessObject to be refreshedObject resolveProxy(Object o)
o
- the object for which to determine the underlying non-ORM-proxy target
boolean isProxied(Object object)
object
- the candidate object
@Deprecated <T> Collection<T> findCollectionBySearchHelper(Class<T> clazz, Map<String,String> formProps, boolean unbounded, boolean allPrimaryKeyValuesPresentAndNotWildcard, Integer searchResultsLimit)
findCollectionBySearchHelper(Class, java.util.Map, java.util.List, boolean, boolean, Integer)
instead
clazz
- the data object typeformProps
- field values for queryunbounded
- whether the search results should be boundedallPrimaryKeyValuesPresentAndNotWildcard
- indicates whether or not the search only contains non-wildcarded primary key valuessearchResultsLimit
- if the search is bounded, the search results limit, otherwise ignored. null is equivalent to KNS default for the clazz
<T> Collection<T> findCollectionBySearchHelper(Class<T> clazz, Map<String,String> formProps, List<String> wildcardAsLiteralPropertyNames, boolean unbounded, boolean allPrimaryKeyValuesPresentAndNotWildcard, Integer searchResultsLimit)
Search results are bounded by the KNS search results limit determined for the class. This implementation further isolates the UIFramework from the LookupService and should be used in place of the deprecated method.
clazz
- the data object typeformProps
- field values for querywildcardAsLiteralPropertyNames
- list of fields for query that do not allow wildcardsunbounded
- whether the search results should be boundedallPrimaryKeyValuesPresentAndNotWildcard
- indicates whether or not the search only contains non-wildcarded primary key valuessearchResultsLimit
- if the search is bounded, the search results limit, otherwise ignored. null is equivalent to KNS default for the clazz
<T> T findObjectBySearch(Class<T> clazz, Map<String,String> formProps)
clazz
- the data object typeformProps
- field values for query
boolean allPrimaryKeyValuesPresentAndNotWildcard(Class<?> boClass, Map<String,String> formProps)
List<String> listPrimaryKeyFieldNames(Class<?> clazz)
Class<?> determineCollectionObjectType(Class<?> containingClass, String collectionPropertyName)
containingClass
- the class of the object containing the collectioncollectionPropertyName
- the name of the property identifying the collection
IllegalArgumentException
- if the given class is not available in metadata or if the given collection property name is incorrectForeignKeyFieldsPopulationState getForeignKeyFieldsPopulationState(Object bo, String referenceName)
bo
- - A populated BusinessObject descendent. Must contain an attributed named referenceName.referenceName
- - The name of the field that is a reference we are analyzing.
Map<String,String> getForeignKeysForReference(Class<?> clazz, String attributeName)
clazz
- - Class that contains the named referenceattributeName
- - Name of the member that is the reference you want foreign keys for
boolean hasPrimaryKeyFieldValues(Object persistableObject)
persistableObject
-
IllegalArgumentException
- if the given Object is null
ClassNotPersistableException
- if the given object is of a type not described in the OJB repositoryboolean hasReference(Class<?> boClass, String referenceName)
boClass
- referenceName
-
boolean hasCollection(Class<?> boClass, String collectionName)
boClass
- collectionName
-
boolean isExtensionAttribute(Class<?> boClass, String attributePropertyName, Class<?> propertyType)
Class<?> getExtensionAttributeClass(Class<?> boClass, String attributePropertyName)
Map<String,?> getPrimaryKeyFieldValuesDOMDS(Object dataObject)
Has DOMDS on the end because this is the version that delegates to DataObjectMetaDataService
dataObject
- - object whose primary key field name,value pairs you want
IllegalArgumentException
- if the given Object is nullboolean equalsByPrimaryKeys(Object do1, Object do2)
do1
- do2
-
PersistableBusinessObject toPersistableBusinessObject(Object object)
object
- the object to cast to a PersistableBusinessObject, must be non-null
IllegalArgumentException
- if the given object is null or does not represent a valid PersistableBusinessObjectvoid materializeAllSubObjects(Object object)
object
- object to materializeClass<?> getPropertyType(Object object, String propertyName)
object
- the object against which to searchpropertyName
- the (optionally nested) property name for which to locate the type
RuntimeException
- if a problem occurred (i.e. bad property name), this exception will be different
depending on whether the underlying implementation is calling legacy code or notPersistableBusinessObjectExtension getExtension(Class<? extends PersistableBusinessObject> businessObjectClass) throws InstantiationException, IllegalAccessException
InstantiationException
IllegalAccessException
void refreshReferenceObject(PersistableBusinessObject businessObject, String referenceObjectName)
boolean isLockable(Object object)
object
- object for which to determine lockable
void verifyVersionNumber(Object dataObject)
If this particular data object does not have versioning, this method will do nothing.
dataObject
- the data object to check the version number for
ValidationException
- if the version number doesn't matchRemotableQuickFinder.Builder createQuickFinder(Class<?> containingClass, String attributeName)
containingClass
- the class on which to locate the attributeattributeName
- the name of the attribute for which to build the quickfinder on the specified containing class
boolean isReferenceUpdatable(Class<?> boClass, String referenceName)
Map<String,Class> listReferenceObjectFields(Class<?> boClass)
boClass
- Class that would like to be analyzed for reference names
boolean isCollectionUpdatable(Class<?> boClass, String collectionName)
Map<String,Class> listCollectionObjectTypes(Class<?> boClass)
Object getReferenceIfExists(Object bo, String referenceName)
bo
- - populated BusinessObject instance that includes the referenceName propertyreferenceName
- - name of the member/property to load
boolean allForeignKeyValuesPopulatedForReference(Object bo, String referenceName)
bo
- referenceName
-
RelationshipDefinition getDictionaryRelationship(Class<?> c, String attributeName)
String getTitleAttribute(Class<?> dataObjectClass)
dataObjectClass
-
boolean areNotesSupported(Class<?> dataObjectClass)
dataObjectClass
-
String getDataObjectIdentifierString(Object dataObject)
dataObject
- data object
Class<?> getInquiryObjectClassIfNotTitle(Object dataObject, String propertyName)
dataObject
- propertyName
-
Map<String,String> getInquiryParameters(Object dataObject, List<String> keys, String propertyName)
dataObject
- keys
- propertyName
-
boolean hasLocalLookup(Class<?> dataObjectClass)
dataObjectClass
- data object class to find lookup for
boolean hasLocalInquiry(Class<?> dataObjectClass)
dataObjectClass
- data object class to find inquiry for
DataObjectRelationship getDataObjectRelationship(Object dataObject, Class<?> dataObjectClass, String attributeName, String attributePrefix, boolean keysOnly, boolean supportsLookup, boolean supportsInquiry)
First the data dictionary is queried to find any relationship definitions
setup that include the attribute, if found the
BusinessObjectRetationship
is build from that. If not and
the data object class is persistent, relationships are retrieved from the
persistence service. Nested attributes are handled in addition to
external business objects. If multiple relationships are found, the one
that contains the least amount of joining keys is returned
dataObject
- - data object instance that contains the attributedataObjectClass
- - class for the data object that contains the attributeattributeName
- - property name for the attributeattributePrefix
- - property prefix for the attributekeysOnly
- - indicates whether only primary key fields should be returned
in the relationshipsupportsLookup
- - indicates whether the relationship should support lookupsupportsInquiry
- - indicates whether the relationship should support inquiry
boolean isPersistable(Class<?> dataObjectClass)
dataObjectClass
- - data object instance that contains the attribute
void setObjectPropertyDeep(Object bo, String propertyName, Class<?> type, Object propertyValue) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
bo
- propertyName
- type
- propertyValue
-
NoSuchMethodException
InvocationTargetException
IllegalAccessException
Class<?> materializeClassForProxiedObject(Object object)
object
- the potentially proxied object to find the Class of
Object getNestedValue(Object bo, String fieldName)
bo
- fieldName
-
Object createNewObjectFromClass(Class clazz)
ExternalizableBusinessObject
, this method will determine the interface for the EBO and
query the
appropriate module service to create a new instance.
clazz
-
boolean isNull(Object object)
object
- - any object, proxied or not, materialized or not
void setObjectProperty(Object bo, String propertyName, Class propertyType, Object propertyValue) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
bo
- propertyName
- propertyType
- propertyValue
-
NoSuchMethodException
InvocationTargetException
IllegalAccessException
<T extends Document> T findByDocumentHeaderId(Class<T> documentClass, String id)
<T extends Document> List<T> findByDocumentHeaderIds(Class<T> documentClass, List<String> ids)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |