org.kuali.rice.krad.service
Interface LegacyDataAdapter

All Known Implementing Classes:
KNSLegacyDataAdapterImpl, KRADLegacyDataAdapterImpl, LegacyDataAdapterImpl

Deprecated. This class is deprecated by default, applications should *never* use this adapter directly

@Deprecated
public interface LegacyDataAdapter

Adapter that supports "legacy" KNS/KRAD persistence, metadata, and object utility frameworks via runtime argument inspection

Author:
Kuali Rice Team (rice.collab@kuali.org).

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
<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> 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
<T> Collection<T>
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.
<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> 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.  
<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<?> 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
<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.  
 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

save

<T> T save(T dataObject)
Deprecated. 
Saves the passed in object or list of objects via the persistence layer.

Parameters:
dataObject - the data object to save

linkAndSave

<T> T linkAndSave(T dataObject)
Deprecated. 
Links up any contained objects, and then saves the passed in object via the persistence layer.

Parameters:
dataObject - the data object to link and save

saveDocument

<T> T saveDocument(T document)
Deprecated. 

findBySinglePrimaryKey

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

Parameters:
clazz - data object type class
primaryKey - the primary key object
Returns:
data object instance

findByPrimaryKey

<T> T findByPrimaryKey(Class<T> clazz,
                       Map<String,?> primaryKeys)
Deprecated. 
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.

Parameters:
clazz - data object type class
primaryKeys - map of String->Object key values
Returns:
data object instance

delete

void delete(Object dataObject)
Deprecated. 
Deletes a data object from the database.

Parameters:
dataObject - the data object to delete

deleteMatching

void deleteMatching(Class<?> clazz,
                    Map<String,?> fieldValues)
Deprecated. 
Deletes data objects from the database.

Parameters:
clazz - the entity type to delete
fieldValues - map String->Object of field values to match

retrieve

<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.

Parameters:
dataObject - the data object
Returns:
the retrieved data object or null if not found

findAll

<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.

Parameters:
clazz - the data object type class
Returns:
collection of all data objects of given type

findMatching

<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. 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.

Parameters:
clazz - the data object type class
fieldValues - map String->Object of field values
Returns:
collection of matching data objects

findMatchingOrderBy

<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. 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.

Parameters:
clazz -
fieldValues -
Returns:
collection of business objects

getPrimaryKeyFieldValues

Map<String,?> getPrimaryKeyFieldValues(Object dataObject)
Deprecated. 
This method retrieves the primary key field values for the given data object

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
Throws:
IllegalArgumentException - if the given Object is null
ClassNotPersistableException - if the given object is of a type not mapped in ORM

retrieveNonKeyFields

void retrieveNonKeyFields(Object persistableObject)
Deprecated. 
Parameters:
persistableObject - object whose objects need to be filled in based on primary keys
Throws:
IllegalArgumentException - if the given Object is null
ClassNotPersistableException - if the given object is of a type not described in the OJB repository

retrieveReferenceObject

void retrieveReferenceObject(Object persistableObject,
                             String referenceObjectName)
Deprecated. 
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
Throws:
IllegalArgumentException - if the given Object is null
ClassNotPersistableException - if the given object is of a type not described in the OJB repository

refreshAllNonUpdatingReferences

void refreshAllNonUpdatingReferences(Object persistableObject)
Deprecated. 
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.

Parameters:
persistableObject - - the businessObject to be refreshed

resolveProxy

Object resolveProxy(Object o)
Deprecated. 
Returns the object underlying any ORM proxy layers

Parameters:
o - the object for which to determine the underlying non-ORM-proxy target
Returns:
the underlying non-ORM-proxy object

isProxied

boolean isProxied(Object object)
Deprecated. 
Returns whether the object is an ORM proxy

Parameters:
object - the candidate object
Returns:
true if the object is an ORM proxy

findCollectionBySearchHelper

@Deprecated
<T> Collection<T> 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

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.

Parameters:
clazz - the data object type
formProps - 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

<T> Collection<T> 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.

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.

Parameters:
clazz - the data object type
formProps - 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

<T> T findObjectBySearch(Class<T> clazz,
                         Map<String,String> formProps)
Deprecated. 
Retrieves a Object based on the search criteria, which should uniquely identify a record.

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

allPrimaryKeyValuesPresentAndNotWildcard

boolean allPrimaryKeyValuesPresentAndNotWildcard(Class<?> boClass,
                                                 Map<String,String> formProps)
Deprecated. 

listPrimaryKeyFieldNames

List<String> listPrimaryKeyFieldNames(Class<?> clazz)
Deprecated. 
Returns a list of primary key field names for the given class.


determineCollectionObjectType

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.

Parameters:
containingClass - 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
Throws:
IllegalArgumentException - if the given class is not available in metadata or if the given collection property name is incorrect

getForeignKeyFieldsPopulationState

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. 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.

Parameters:
bo - - 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

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. The Map structure is: Key(String fkFieldName) => Value(String pkFieldName)

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

boolean hasPrimaryKeyFieldValues(Object persistableObject)
Deprecated. 
Parameters:
persistableObject -
Returns:
true if all primary key fields of the string have a non-null (and non-empty, for Strings) value
Throws:
IllegalArgumentException - if the given Object is null
ClassNotPersistableException - if the given object is of a type not described in the OJB repository

hasReference

boolean hasReference(Class<?> boClass,
                     String referenceName)
Deprecated. 
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.

Parameters:
boClass -
referenceName -
Returns:
true if the reference exists

hasCollection

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.

Parameters:
boClass -
collectionName -
Returns:
true if a collection is defined

isExtensionAttribute

boolean isExtensionAttribute(Class<?> boClass,
                             String attributePropertyName,
                             Class<?> propertyType)
Deprecated. 

getExtensionAttributeClass

Class<?> getExtensionAttributeClass(Class<?> boClass,
                                    String attributePropertyName)
Deprecated. 

getPrimaryKeyFieldValuesDOMDS

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

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

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
Throws:
IllegalArgumentException - if the given Object is null

equalsByPrimaryKeys

boolean equalsByPrimaryKeys(Object do1,
                            Object do2)
Deprecated. 
Compares two dataObject instances for equality based on primary keys

Parameters:
do1 -
do2 -
Returns:
boolean indicating whether the two objects are equal.

toPersistableBusinessObject

PersistableBusinessObject toPersistableBusinessObject(Object object)
Deprecated. 
Casts the given object to a PersistableBusinessObject, checking first whether or not it is a valid PersistableBusinessObject.

Parameters:
object - the object to cast to a PersistableBusinessObject, must be non-null
Returns:
the PersistableBusinessObject for the given object, will never return null
Throws:
IllegalArgumentException - if the given object is null or does not represent a valid PersistableBusinessObject

materializeAllSubObjects

void materializeAllSubObjects(Object object)
Deprecated. 
Materializes any references on the given object.

Parameters:
object - object to materialize

getPropertyType

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

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
Throws:
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 not

getExtension

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

Throws:
InstantiationException
IllegalAccessException

refreshReferenceObject

void refreshReferenceObject(PersistableBusinessObject businessObject,
                            String referenceObjectName)
Deprecated. 
Refreshes the specified reference object on the given business object.


isLockable

boolean isLockable(Object object)
Deprecated. 
Determines if the given ojbect is "lockable".

Parameters:
object - object for which to determine lockable
Returns:
true if lockable, false otherwise

verifyVersionNumber

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. 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.

Parameters:
dataObject - the data object to check the version number for
Throws:
ValidationException - if the version number doesn't match

createQuickFinder

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.

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

boolean isReferenceUpdatable(Class<?> boClass,
                             String referenceName)
Deprecated. 

listReferenceObjectFields

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. 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.

Parameters:
boClass - 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

boolean isCollectionUpdatable(Class<?> boClass,
                              String collectionName)
Deprecated. 

listCollectionObjectTypes

Map<String,Class> listCollectionObjectTypes(Class<?> boClass)
Deprecated. 

getReferenceIfExists

Object getReferenceIfExists(Object bo,
                            String referenceName)
Deprecated. 
This method attempts to retrieve the reference from a BO if it exists.

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

boolean allForeignKeyValuesPopulatedForReference(Object bo,
                                                 String referenceName)
Deprecated. 
This method examines whether all the foreign key fields for the specified reference contain values.

Parameters:
bo -
referenceName -
Returns:
true if they all are accessible and have values, false otherwise

getDictionaryRelationship

RelationshipDefinition getDictionaryRelationship(Class<?> c,
                                                 String attributeName)
Deprecated. 

getTitleAttribute

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

Parameters:
dataObjectClass -
Returns:
title if available, otherwise null

areNotesSupported

boolean areNotesSupported(Class<?> dataObjectClass)
Deprecated. 
Parameters:
dataObjectClass -
Returns:
true is supported, otherwise false

getDataObjectIdentifierString

String getDataObjectIdentifierString(Object dataObject)
Deprecated. 
Gets the identifier for a data object

Parameters:
dataObject - data object
Returns:
data object identifier

getInquiryObjectClassIfNotTitle

Class<?> getInquiryObjectClassIfNotTitle(Object dataObject,
                                         String propertyName)
Deprecated. 
Get Inquiry class if not the title attribute

Parameters:
dataObject -
propertyName -
Returns:
class that represents the inquiry object class, null otherwise

getInquiryParameters

Map<String,String> getInquiryParameters(Object dataObject,
                                        List<String> keys,
                                        String propertyName)
Deprecated. 
Get Inquiry parameters for given keys for data object/property name

Parameters:
dataObject -
keys -
propertyName -
Returns:
map of key value pairs, empty map otherwise

hasLocalLookup

boolean hasLocalLookup(Class<?> dataObjectClass)
Deprecated. 
Determines whether the given data object class has an associated lookup in the local running application

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

boolean hasLocalInquiry(Class<?> dataObjectClass)
Deprecated. 
Determines whether the given data object class has an associated inquiry in the local running application

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

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

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

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

boolean isPersistable(Class<?> dataObjectClass)
Deprecated. 
Determines if a class is persistable

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

setObjectPropertyDeep

void setObjectPropertyDeep(Object bo,
                           String propertyName,
                           Class<?> type,
                           Object propertyValue)
                           throws IllegalAccessException,
                                  InvocationTargetException,
                                  NoSuchMethodException
Deprecated. 
Recursive; sets all occurences of the property in the object, its nested objects and its object lists with the given value.

Parameters:
bo -
propertyName -
type -
propertyValue -
Throws:
NoSuchMethodException
InvocationTargetException
IllegalAccessException

materializeClassForProxiedObject

Class<?> materializeClassForProxiedObject(Object object)
Deprecated. 
Attempts to find the Class for the given potentially proxied object

Parameters:
object - the potentially proxied object to find the Class of
Returns:
the best Class which could be found for the given object

getNestedValue

Object getNestedValue(Object bo,
                      String fieldName)
Deprecated. 
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.

Parameters:
bo -
fieldName -
Returns:
The field value if it exists. If it doesnt, and the name is invalid, and

createNewObjectFromClass

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.

Parameters:
clazz -
Returns:
a newInstance() of clazz

isNull

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. 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.

Parameters:
object - - any object, proxied or not, materialized or not
Returns:
true if the object (or underlying materialized object) is null, false otherwise

setObjectProperty

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

Parameters:
bo -
propertyName -
propertyType -
propertyValue -
Throws:
NoSuchMethodException
InvocationTargetException
IllegalAccessException

findByDocumentHeaderId

<T extends Document> T findByDocumentHeaderId(Class<T> documentClass,
                                              String id)
Deprecated. 
Finds the Document for the specified class with the given id.


findByDocumentHeaderIds

<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.



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