org.kuali.rice.krad.service.impl
Class LegacyDataAdapterImpl

java.lang.Object
  extended by org.kuali.rice.krad.service.impl.LegacyDataAdapterImpl
All Implemented Interfaces:
LegacyDataAdapter

Deprecated. instead of using this class, where possible go directly against new KRAD code

@Deprecated
public class LegacyDataAdapterImpl
extends Object
implements LegacyDataAdapter

LegacyDataAdapter implementation.


Constructor Summary
LegacyDataAdapterImpl()
          Deprecated.  
 
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<?> type, Map<String,?> fieldValues)
          Deprecated. Deletes data objects from the database.
 Class<?> determineCollectionObjectType(Class<?> containingType, 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
<T> Collection<T>
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.
<T extends Document>
T
findByDocumentHeaderId(Class<T> documentClass, String id)
          Deprecated. Finds the Document for the specified class with the given id.
<T extends Document>
List<T>
findByDocumentHeaderIds(Class<T> documentClass, List<String> ids)
          Deprecated. Finds the Documents for the specified class with the given list of ids.
<T> T
findByPrimaryKey(Class<T> clazz, Map<String,?> primaryKeys)
          Deprecated. Retrieves an object instance identified by its primary keys and values.
<T> T
findBySinglePrimaryKey(Class<T> clazz, Object primaryKey)
          Deprecated. Retrieves an object instance identified by its primary key.
<T> Collection<T>
findCollectionBySearchHelper(Class<T> dataObjectClass, Map<String,String> formProperties, boolean unbounded, boolean allPrimaryKeyValuesPresentAndNotWildcard, Integer searchResultsLimit)
          Deprecated. Returns a collection of objects based on the given search parameters.
<T> Collection<T>
findCollectionBySearchHelper(Class<T> dataObjectClass, Map<String,String> formProperties, List<String> wildcardAsLiteralPropertyNames, boolean unbounded, boolean allPrimaryKeyValuesPresentAndNotWildcard, Integer searchResultsLimit)
          Deprecated. Returns a collection of objects based on the given search parameters.
<T> Collection<T>
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.
<T> Collection<T>
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.
<T> T
findObjectBySearch(Class<T> type, 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 dataObject, 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
 LegacyDataAdapter getKnsLegacyDataAdapter()
          Deprecated.  
 LegacyDataAdapter getKradLegacyDataAdapter()
          Deprecated.  
 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 dataObject)
          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<?> type, 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<?> type, String referenceName)
          Deprecated.  
<T> T
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<?> type)
          Deprecated.  
 List<String> listPrimaryKeyFieldNames(Class<?> type)
          Deprecated. Returns a list of primary key field names for the given class.
 Map<String,Class> listReferenceObjectFields(Class<?> type)
          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 object)
          Deprecated. Returns the object underlying any ORM proxy layers
<T> T
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.  
<T> T
save(T dataObject)
          Deprecated. Saves the passed in object or list of objects via the persistence layer.
<T> T
saveDocument(T document)
          Deprecated.  
protected  LegacyDataAdapter selectAdapter(Object dataObject)
          Deprecated.  
 void setKnsLegacyDataAdapter(LegacyDataAdapter knsLegacyDataAdapter)
          Deprecated.  
 void setKradLegacyDataAdapter(LegacyDataAdapter kradLegacyDataAdapter)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegacyDataAdapterImpl

public LegacyDataAdapterImpl()
Deprecated. 
Method Detail

save

public <T> T save(T dataObject)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Saves the passed in object or list of objects via the persistence layer.

Specified by:
save in interface LegacyDataAdapter
Parameters:
dataObject - the data object to save

linkAndSave

public <T> T linkAndSave(T dataObject)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Links up any contained objects, and then saves the passed in object via the persistence layer.

Specified by:
linkAndSave in interface LegacyDataAdapter
Parameters:
dataObject - the data object to link and save

saveDocument

public <T> T saveDocument(T document)
Deprecated. 
Specified by:
saveDocument in interface LegacyDataAdapter

findByPrimaryKey

public <T> T findByPrimaryKey(Class<T> clazz,
                              Map<String,?> primaryKeys)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Retrieves an object instance identified by its primary keys and values. This can be done by constructing a map where the key to the map entry is the primary key attribute and the value of the entry being the primary key value. For composite keys, pass in each primaryKey attribute and its value as a map entry.

Specified by:
findByPrimaryKey in interface LegacyDataAdapter
Parameters:
clazz - data object type class
primaryKeys - map of String->Object key values
Returns:
data object instance

findBySinglePrimaryKey

public <T> T findBySinglePrimaryKey(Class<T> clazz,
                                    Object primaryKey)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Retrieves an object instance identified by its primary key. For composite keys, use LegacyDataAdapter.findByPrimaryKey(Class, Map)

Specified by:
findBySinglePrimaryKey in interface LegacyDataAdapter
Parameters:
clazz - data object type class
primaryKey - the primary key object
Returns:
data object instance

delete

public void delete(Object dataObject)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Deletes a data object from the database.

Specified by:
delete in interface LegacyDataAdapter
Parameters:
dataObject - the data object to delete

deleteMatching

public void deleteMatching(Class<?> type,
                           Map<String,?> fieldValues)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Deletes data objects from the database.

Specified by:
deleteMatching in interface LegacyDataAdapter
Parameters:
type - the entity type to delete
fieldValues - map String->Object of field values to match

retrieve

public <T> T retrieve(T dataObject)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Retrieves an object instance identified by the class of the given object and the object's primary key values.

Specified by:
retrieve in interface LegacyDataAdapter
Parameters:
dataObject - the data object
Returns:
the retrieved data object or null if not found

findAll

public <T> Collection<T> findAll(Class<T> clazz)
Deprecated. 
Description copied from interface: LegacyDataAdapter
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.

Specified by:
findAll in interface LegacyDataAdapter
Parameters:
clazz - the data object type class
Returns:
collection of all data objects of given type

findMatching

public <T> Collection<T> findMatching(Class<T> clazz,
                                      Map<String,?> fieldValues)
Deprecated. 
Description copied from interface: LegacyDataAdapter
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 retrieve data objects by class type and also by criteria passed in as key-value pairs, specifically attribute name and its expected value.

Specified by:
findMatching in interface LegacyDataAdapter
Parameters:
clazz - the data object type class
fieldValues - map String->Object of field values
Returns:
collection of matching data objects

findMatchingOrderBy

public <T> Collection<T> findMatchingOrderBy(Class<T> clazz,
                                             Map<String,?> fieldValues,
                                             String sortField,
                                             boolean sortAscending)
Deprecated. 
Description copied from interface: LegacyDataAdapter
This method retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. This will retrieve business objects by class type and also by criteria passed in as key-value pairs, specifically attribute name and its expected value. Performs an order by on sort field.

Specified by:
findMatchingOrderBy in interface LegacyDataAdapter
Returns:
collection of business objects

getPrimaryKeyFieldValues

public Map<String,?> getPrimaryKeyFieldValues(Object dataObject)
Deprecated. 
Description copied from interface: LegacyDataAdapter
This method retrieves the primary key field values for the given data object

Specified by:
getPrimaryKeyFieldValues in interface LegacyDataAdapter
Parameters:
dataObject - data object whose primary key field name,value pairs you want
Returns:
a Map containing the names and values of primary key fields for the data object

retrieveNonKeyFields

public void retrieveNonKeyFields(Object persistableObject)
Deprecated. 
Specified by:
retrieveNonKeyFields in interface LegacyDataAdapter
Parameters:
persistableObject - object whose objects need to be filled in based on primary keys

retrieveReferenceObject

public void retrieveReferenceObject(Object persistableObject,
                                    String referenceObjectName)
Deprecated. 
Specified by:
retrieveReferenceObject in interface LegacyDataAdapter
Parameters:
persistableObject - object whose specified reference object needs to be filled in based on primary keys
referenceObjectName - the name of the reference object that will be filled in based on primary key values

refreshAllNonUpdatingReferences

public void refreshAllNonUpdatingReferences(Object persistableObject)
Deprecated. 
Description copied from interface: LegacyDataAdapter
This method refreshes all reference objects to this main object that are 'non-updateable'. In general, this means that if a reference object is configured to not be updated when the parent document is saved, then they are non-updated. This will not refresh updateable objects, which can cause problems when you're creating new objects. See PersistenceServiceImpl.isUpdateableReference() for the full logic.

Specified by:
refreshAllNonUpdatingReferences in interface LegacyDataAdapter
Parameters:
persistableObject - - the businessObject to be refreshed

isProxied

public boolean isProxied(Object object)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Returns whether the object is an ORM proxy

Specified by:
isProxied in interface LegacyDataAdapter
Parameters:
object - the candidate object
Returns:
true if the object is an ORM proxy

resolveProxy

public Object resolveProxy(Object object)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Returns the object underlying any ORM proxy layers

Specified by:
resolveProxy in interface LegacyDataAdapter
Parameters:
object - the object for which to determine the underlying non-ORM-proxy target
Returns:
the underlying non-ORM-proxy object

findCollectionBySearchHelper

public <T> Collection<T> findCollectionBySearchHelper(Class<T> dataObjectClass,
                                                      Map<String,String> formProperties,
                                                      boolean unbounded,
                                                      boolean allPrimaryKeyValuesPresentAndNotWildcard,
                                                      Integer searchResultsLimit)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Returns a collection of objects based on the given search parameters. Search results are bounded by the KNS search results limit determined for the class.

Specified by:
findCollectionBySearchHelper in interface LegacyDataAdapter
Parameters:
dataObjectClass - the data object type
formProperties - field values for query
unbounded - whether the search results should be bounded
allPrimaryKeyValuesPresentAndNotWildcard - indicates whether or not the search only contains non-wildcarded primary key values
searchResultsLimit - if the search is bounded, the search results limit, otherwise ignored. null is equivalent to KNS default for the clazz
Returns:
collection of matching data objects

findCollectionBySearchHelper

public <T> Collection<T> findCollectionBySearchHelper(Class<T> dataObjectClass,
                                                      Map<String,String> formProperties,
                                                      List<String> wildcardAsLiteralPropertyNames,
                                                      boolean unbounded,
                                                      boolean allPrimaryKeyValuesPresentAndNotWildcard,
                                                      Integer searchResultsLimit)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Returns a collection of objects based on the given search parameters.

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.

Specified by:
findCollectionBySearchHelper in interface LegacyDataAdapter
Parameters:
dataObjectClass - the data object type
formProperties - field values for query
wildcardAsLiteralPropertyNames - list of fields for query that do not allow wildcards
unbounded - whether the search results should be bounded
allPrimaryKeyValuesPresentAndNotWildcard - indicates whether or not the search only contains non-wildcarded primary key values
searchResultsLimit - if the search is bounded, the search results limit, otherwise ignored. null is equivalent to KNS default for the clazz
Returns:
collection of matching data objects

findObjectBySearch

public <T> T findObjectBySearch(Class<T> type,
                                Map<String,String> formProps)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Retrieves a Object based on the search criteria, which should uniquely identify a record.

Specified by:
findObjectBySearch in interface LegacyDataAdapter
Parameters:
type - the data object type
formProps - field values for query
Returns:
first object in returned search results, or null if none found

allPrimaryKeyValuesPresentAndNotWildcard

public boolean allPrimaryKeyValuesPresentAndNotWildcard(Class<?> boClass,
                                                        Map<String,String> formProps)
Deprecated. 
Specified by:
allPrimaryKeyValuesPresentAndNotWildcard in interface LegacyDataAdapter

listPrimaryKeyFieldNames

public List<String> listPrimaryKeyFieldNames(Class<?> type)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Returns a list of primary key field names for the given class.

Specified by:
listPrimaryKeyFieldNames in interface LegacyDataAdapter

determineCollectionObjectType

public Class<?> determineCollectionObjectType(Class<?> containingType,
                                              String collectionPropertyName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Determines the type of the collection object on the class with the collection with the given property name.

Specified by:
determineCollectionObjectType in interface LegacyDataAdapter
Parameters:
containingType - the class of the object containing the collection
collectionPropertyName - the name of the property identifying the collection
Returns:
the Class of elements in the identified collection

hasReference

public boolean hasReference(Class<?> boClass,
                            String referenceName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Returns whether there is a reference defined in the persistence layer with the given name. Depending on the type of underlying persistence mechanism, this method may or may not return true when the referenceName really refers to a collection type. To determine whether a reference is a collection, use the hasCollection method instead. In OJB, this method will return false for collection references.

Specified by:
hasReference in interface LegacyDataAdapter
Returns:
true if the reference exists

hasCollection

public boolean hasCollection(Class<?> boClass,
                             String collectionName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Returns whether BOs of the given class have a collection defined within them with the given collection name.

Specified by:
hasCollection in interface LegacyDataAdapter
Returns:
true if a collection is defined

isExtensionAttribute

public boolean isExtensionAttribute(Class<?> boClass,
                                    String attributePropertyName,
                                    Class<?> propertyType)
Deprecated. 
Specified by:
isExtensionAttribute in interface LegacyDataAdapter

getExtensionAttributeClass

public Class<?> getExtensionAttributeClass(Class<?> boClass,
                                           String attributePropertyName)
Deprecated. 
Specified by:
getExtensionAttributeClass in interface LegacyDataAdapter

getPrimaryKeyFieldValuesDOMDS

public Map<String,?> getPrimaryKeyFieldValuesDOMDS(Object dataObject)
Deprecated. 
Description copied from interface: LegacyDataAdapter
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

Has DOMDS on the end because this is the version that delegates to DataObjectMetaDataService

Specified by:
getPrimaryKeyFieldValuesDOMDS in interface LegacyDataAdapter
Parameters:
dataObject - - object whose primary key field name,value pairs you want
Returns:
a Map containing the names and values of fields for the given class which are designated as key fields in the OJB repository file or DataDictionary

equalsByPrimaryKeys

public boolean equalsByPrimaryKeys(Object do1,
                                   Object do2)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Compares two dataObject instances for equality based on primary keys

Specified by:
equalsByPrimaryKeys in interface LegacyDataAdapter
Returns:
boolean indicating whether the two objects are equal.

toPersistableBusinessObject

public PersistableBusinessObject toPersistableBusinessObject(Object object)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Casts the given object to a PersistableBusinessObject, checking first whether or not it is a valid PersistableBusinessObject.

Specified by:
toPersistableBusinessObject in interface LegacyDataAdapter
Parameters:
object - the object to cast to a PersistableBusinessObject, must be non-null
Returns:
the PersistableBusinessObject for the given object, will never return null

materializeAllSubObjects

public void materializeAllSubObjects(Object object)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Materializes any references on the given object.

Specified by:
materializeAllSubObjects in interface LegacyDataAdapter
Parameters:
object - object to materialize

getPropertyType

public Class<?> getPropertyType(Object object,
                                String propertyName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Returns the type of the property with the given name on the supplied object. The property path may be nested.

Specified by:
getPropertyType in interface LegacyDataAdapter
Parameters:
object - the object against which to search
propertyName - the (optionally nested) property name for which to locate the type
Returns:
the type of the property

getExtension

public PersistableBusinessObjectExtension getExtension(Class<? extends PersistableBusinessObject> businessObjectClass)
                                                throws InstantiationException,
                                                       IllegalAccessException
Deprecated. 
Description copied from interface: LegacyDataAdapter
Creates an instance of the extension for the given business object class.

Specified by:
getExtension in interface LegacyDataAdapter
Throws:
InstantiationException
IllegalAccessException

refreshReferenceObject

public void refreshReferenceObject(PersistableBusinessObject businessObject,
                                   String referenceObjectName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Refreshes the specified reference object on the given business object.

Specified by:
refreshReferenceObject in interface LegacyDataAdapter

isLockable

public boolean isLockable(Object object)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Determines if the given ojbect is "lockable".

Specified by:
isLockable in interface LegacyDataAdapter
Parameters:
object - object for which to determine lockable
Returns:
true if lockable, false otherwise

verifyVersionNumber

public void verifyVersionNumber(Object dataObject)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Verifies that the version number of the given data object (if it has one) matches what is currently in the database. If not, then the GlobalVariables message map will be updated with an error message and a ValidationException will be thrown.

If this particular data object does not have versioning, this method will do nothing.

Specified by:
verifyVersionNumber in interface LegacyDataAdapter
Parameters:
dataObject - the data object to check the version number for

createQuickFinder

public RemotableQuickFinder.Builder createQuickFinder(Class<?> containingClass,
                                                      String attributeName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Returns the builder for a remotable quick finder for the given attribute name on the given containing class.

Specified by:
createQuickFinder in interface LegacyDataAdapter
Parameters:
containingClass - the class on which to locate the attribute
attributeName - the name of the attribute for which to build the quickfinder on the specified containing class
Returns:
the remotable quickfinder, or null if no such finder could be created

isReferenceUpdatable

public boolean isReferenceUpdatable(Class<?> type,
                                    String referenceName)
Deprecated. 
Specified by:
isReferenceUpdatable in interface LegacyDataAdapter

listReferenceObjectFields

public Map<String,Class> listReferenceObjectFields(Class<?> type)
Deprecated. 
Description copied from interface: LegacyDataAdapter
This method uses the persistence layer to determine the list of reference objects contained within this parent object. For example, an Account object contains sub-objects such as Chart, as well as the key that connects the two, String chartOfAccountsCode. The return structure is: Map. As an example, an Account object passed into this would return: 0:['chartOfAccounts', org.kuali.module.chart.bo.Chart] 1:['organization', org.kuali.module.chart.bo.Org] etc.

Specified by:
listReferenceObjectFields in interface LegacyDataAdapter
Parameters:
type - Class that would like to be analyzed for reference names
Returns:
Map containing the reference name for the key as a string, and the class of the reference as the value. If the object contains no references, then this Map will be empty.

isCollectionUpdatable

public boolean isCollectionUpdatable(Class<?> type,
                                     String collectionName)
Deprecated. 
Specified by:
isCollectionUpdatable in interface LegacyDataAdapter

listCollectionObjectTypes

public Map<String,Class> listCollectionObjectTypes(Class<?> type)
Deprecated. 
Specified by:
listCollectionObjectTypes in interface LegacyDataAdapter

getReferenceIfExists

public Object getReferenceIfExists(Object bo,
                                   String referenceName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
This method attempts to retrieve the reference from a BO if it exists.

Specified by:
getReferenceIfExists in interface LegacyDataAdapter
Parameters:
bo - - populated BusinessObject instance that includes the referenceName property
referenceName - - name of the member/property to load
Returns:
A populated object from the DB, if it exists

allForeignKeyValuesPopulatedForReference

public boolean allForeignKeyValuesPopulatedForReference(Object bo,
                                                        String referenceName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
This method examines whether all the foreign key fields for the specified reference contain values.

Specified by:
allForeignKeyValuesPopulatedForReference in interface LegacyDataAdapter
Returns:
true if they all are accessible and have values, false otherwise

getDictionaryRelationship

public RelationshipDefinition getDictionaryRelationship(Class<?> c,
                                                        String attributeName)
Deprecated. 
Specified by:
getDictionaryRelationship in interface LegacyDataAdapter

getTitleAttribute

public String getTitleAttribute(Class<?> dataObjectClass)
Deprecated. 
Description copied from interface: LegacyDataAdapter
This method gets the title attribute from the datadictionary for the given data object class

Specified by:
getTitleAttribute in interface LegacyDataAdapter
Returns:
title if available, otherwise null

areNotesSupported

public boolean areNotesSupported(Class<?> dataObjectClass)
Deprecated. 
Specified by:
areNotesSupported in interface LegacyDataAdapter
Returns:
true is supported, otherwise false

getDataObjectIdentifierString

public String getDataObjectIdentifierString(Object dataObject)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Gets the identifier for a data object

Specified by:
getDataObjectIdentifierString in interface LegacyDataAdapter
Parameters:
dataObject - data object
Returns:
data object identifier

getInquiryObjectClassIfNotTitle

public Class<?> getInquiryObjectClassIfNotTitle(Object dataObject,
                                                String propertyName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Get Inquiry class if not the title attribute

Specified by:
getInquiryObjectClassIfNotTitle in interface LegacyDataAdapter
Returns:
class that represents the inquiry object class, null otherwise

getInquiryParameters

public Map<String,String> getInquiryParameters(Object dataObject,
                                               List<String> keys,
                                               String propertyName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Get Inquiry parameters for given keys for data object/property name

Specified by:
getInquiryParameters in interface LegacyDataAdapter
Returns:
map of key value pairs, empty map otherwise

hasLocalLookup

public boolean hasLocalLookup(Class<?> dataObjectClass)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Determines whether the given data object class has an associated lookup in the local running application

Specified by:
hasLocalLookup in interface LegacyDataAdapter
Parameters:
dataObjectClass - data object class to find lookup for
Returns:
boolean true if a lookup exists for the data object class, false if not

hasLocalInquiry

public boolean hasLocalInquiry(Class<?> dataObjectClass)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Determines whether the given data object class has an associated inquiry in the local running application

Specified by:
hasLocalInquiry in interface LegacyDataAdapter
Parameters:
dataObjectClass - data object class to find inquiry for
Returns:
boolean true if a inquiry exists for the data object class, false if not

getDataObjectRelationship

public DataObjectRelationship getDataObjectRelationship(Object dataObject,
                                                        Class<?> dataObjectClass,
                                                        String attributeName,
                                                        String attributePrefix,
                                                        boolean keysOnly,
                                                        boolean supportsLookup,
                                                        boolean supportsInquiry)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Attempts to find a relationship for the given attribute within the given data object

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

Specified by:
getDataObjectRelationship in interface LegacyDataAdapter
Parameters:
dataObject - - data object instance that contains the attribute
dataObjectClass - - class for the data object that contains the attribute
attributeName - - property name for the attribute
attributePrefix - - property prefix for the attribute
keysOnly - - indicates whether only primary key fields should be returned in the relationship
supportsLookup - - indicates whether the relationship should support lookup
supportsInquiry - - indicates whether the relationship should support inquiry
Returns:
BusinessObjectRelationship for the attribute, or null if not found

isPersistable

public boolean isPersistable(Class<?> dataObjectClass)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Determines if a class is persistable

Specified by:
isPersistable in interface LegacyDataAdapter
Parameters:
dataObjectClass - - data object instance that contains the attribute
Returns:
true if the given Class is persistable (is known to OJB or JPA)

getForeignKeyFieldsPopulationState

public ForeignKeyFieldsPopulationState getForeignKeyFieldsPopulationState(Object dataObject,
                                                                          String referenceName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
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. In other words, for a given reference, it finds all the attributes of the BO that make up the foreign keys, and checks to see if they all have values. It also keeps a list of all the fieldNames that do not have values.

Specified by:
getForeignKeyFieldsPopulationState in interface LegacyDataAdapter
Parameters:
dataObject - - A populated BusinessObject descendent. Must contain an attributed named referenceName.
referenceName - - The name of the field that is a reference we are analyzing.
Returns:
A populated ForeignKeyFieldsPopulation object which represents the state of population for the foreign key fields.

getForeignKeysForReference

public Map<String,String> getForeignKeysForReference(Class<?> clazz,
                                                     String attributeName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
This method will return a Map of all the foreign key fields and the corresponding primary key fields for a given reference. The Map structure is: Key(String fkFieldName) => Value(String pkFieldName)

Specified by:
getForeignKeysForReference in interface LegacyDataAdapter
Parameters:
clazz - - Class that contains the named reference
attributeName - - Name of the member that is the reference you want foreign keys for
Returns:
returns a Map populated as described above, with one entry per foreign key field

hasPrimaryKeyFieldValues

public boolean hasPrimaryKeyFieldValues(Object dataObject)
Deprecated. 
Specified by:
hasPrimaryKeyFieldValues in interface LegacyDataAdapter
Returns:
true if all primary key fields of the string have a non-null (and non-empty, for Strings) value

setObjectPropertyDeep

public void setObjectPropertyDeep(Object bo,
                                  String propertyName,
                                  Class type,
                                  Object propertyValue)
                           throws IllegalAccessException,
                                  InvocationTargetException,
                                  NoSuchMethodException
Deprecated. 
Description copied from interface: LegacyDataAdapter
Recursive; sets all occurences of the property in the object, its nested objects and its object lists with the given value.

Specified by:
setObjectPropertyDeep in interface LegacyDataAdapter
Throws:
IllegalAccessException
InvocationTargetException
NoSuchMethodException

materializeClassForProxiedObject

public Class materializeClassForProxiedObject(Object object)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Attempts to find the Class for the given potentially proxied object

Specified by:
materializeClassForProxiedObject in interface LegacyDataAdapter
Parameters:
object - the potentially proxied object to find the Class of
Returns:
the best Class which could be found for the given object

getNestedValue

public Object getNestedValue(Object bo,
                             String fieldName)
Deprecated. 
Description copied from interface: LegacyDataAdapter
This method safely extracts either simple values OR nested values. For example, if the bo is SubAccount, and the fieldName is a21SubAccount.subAccountTypeCode, this thing makes sure it gets the value off the very end attribute, no matter how deeply nested it is. The code would be slightly simpler if this was done recursively, but this is safer, and consumes a constant amount of memory, no matter how deeply nested it goes.

Specified by:
getNestedValue in interface LegacyDataAdapter
Returns:
The field value if it exists. If it doesnt, and the name is invalid, and

createNewObjectFromClass

public Object createNewObjectFromClass(Class clazz)
Deprecated. 
Description copied from interface: LegacyDataAdapter
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.

Specified by:
createNewObjectFromClass in interface LegacyDataAdapter
Returns:
a newInstance() of clazz

isNull

public boolean isNull(Object object)
Deprecated. 
Description copied from interface: LegacyDataAdapter
This method is a OJB Proxy-safe way to test for null on a proxied object that may or may not be materialized yet. It is safe to use on a proxy (materialized or non-materialized) or on a non-proxy (ie, regular object). Note that this will force a materialization of the proxy if the object is a proxy and unmaterialized.

Specified by:
isNull in interface LegacyDataAdapter
Parameters:
object - - any object, proxied or not, materialized or not
Returns:
true if the object (or underlying materialized object) is null, false otherwise

setObjectProperty

public void setObjectProperty(Object bo,
                              String propertyName,
                              Class propertyType,
                              Object propertyValue)
                       throws IllegalAccessException,
                              InvocationTargetException,
                              NoSuchMethodException
Deprecated. 
Description copied from interface: LegacyDataAdapter
Sets the property of an object with the given value. Converts using the formatter of the given type if one is found.

Specified by:
setObjectProperty in interface LegacyDataAdapter
Throws:
IllegalAccessException
InvocationTargetException
NoSuchMethodException

findByDocumentHeaderId

public <T extends Document> T findByDocumentHeaderId(Class<T> documentClass,
                                                     String id)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Finds the Document for the specified class with the given id.

Specified by:
findByDocumentHeaderId in interface LegacyDataAdapter

findByDocumentHeaderIds

public <T extends Document> List<T> findByDocumentHeaderIds(Class<T> documentClass,
                                                            List<String> ids)
Deprecated. 
Description copied from interface: LegacyDataAdapter
Finds the Documents for the specified class with the given list of ids.

Specified by:
findByDocumentHeaderIds in interface LegacyDataAdapter

selectAdapter

protected LegacyDataAdapter selectAdapter(Object dataObject)
Deprecated. 

getKradLegacyDataAdapter

public LegacyDataAdapter getKradLegacyDataAdapter()
Deprecated. 

setKradLegacyDataAdapter

public void setKradLegacyDataAdapter(LegacyDataAdapter kradLegacyDataAdapter)
Deprecated. 

getKnsLegacyDataAdapter

public LegacyDataAdapter getKnsLegacyDataAdapter()
Deprecated. 

setKnsLegacyDataAdapter

public void setKnsLegacyDataAdapter(LegacyDataAdapter knsLegacyDataAdapter)
Deprecated. 


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.