public class ProviderBasedDataObjectService extends Object implements org.kuali.rice.krad.data.DataObjectService
Modifier and Type | Field and Description |
---|---|
protected org.kuali.rice.krad.data.metadata.MetadataRepository |
metadataRepository
The metadata repository.
|
protected org.kuali.rice.krad.data.provider.ProviderRegistry |
providerRegistry
The provider registry.
|
protected org.kuali.rice.krad.data.util.ReferenceLinker |
referenceLinker
The reference linker.
|
Constructor and Description |
---|
ProviderBasedDataObjectService() |
Modifier and Type | Method and Description |
---|---|
<T> T |
copyInstance(T dataObject,
org.kuali.rice.krad.data.CopyOption... options) |
void |
delete(Object dataObject) |
<T> void |
deleteAll(Class<T> type) |
<T> void |
deleteMatching(Class<T> type,
org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria) |
<T> T |
find(Class<T> type,
Object id) |
<T> org.kuali.rice.core.api.criteria.QueryResults<T> |
findAll(Class<T> type) |
<T> org.kuali.rice.core.api.criteria.QueryResults<T> |
findMatching(Class<T> type,
org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria) |
<T> T |
findUnique(Class<T> type,
org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria) |
void |
flush(Class<?> type) |
org.kuali.rice.krad.data.metadata.MetadataRepository |
getMetadataRepository() |
org.kuali.rice.krad.data.util.ReferenceLinker |
getReferenceLinker()
Gets the reference linker.
|
protected org.kuali.rice.krad.data.provider.PersistenceProvider |
persistenceProviderForObject(Object object)
Gets the PersistenceProvider returned by the ProviderRegistry for the given object.
|
protected org.kuali.rice.krad.data.provider.PersistenceProvider |
persistenceProviderForType(Class<?> type)
Gets the PersistenceProvider returned by the ProviderRegistry for the given type.
|
protected void |
pushOneToOneKeysToChildObjects(Object dataObject) |
protected Object |
reduceCompoundKey(Object id)
If the given id object is an instance of CompoundKey but there is only one entry in the key map, then just grab
that single value and treat it as a single id.
|
<T> T |
save(T dataObject,
org.kuali.rice.krad.data.PersistenceOption... options) |
void |
setMetadataRepository(org.kuali.rice.krad.data.metadata.MetadataRepository metadataRepository)
Setter for the metadata repository.
|
void |
setProviderRegistry(org.kuali.rice.krad.data.provider.ProviderRegistry providerRegistry)
Setter for the provider registry.
|
void |
setReferenceLinker(org.kuali.rice.krad.data.util.ReferenceLinker referenceLinker)
Setter for the reference linker.
|
<T> boolean |
supports(Class<T> type) |
<T> org.kuali.rice.krad.data.DataObjectWrapper<T> |
wrap(T dataObject) |
protected org.kuali.rice.krad.data.provider.ProviderRegistry providerRegistry
protected org.kuali.rice.krad.data.metadata.MetadataRepository metadataRepository
protected org.kuali.rice.krad.data.util.ReferenceLinker referenceLinker
public ProviderBasedDataObjectService()
public <T> T find(Class<T> type, Object id)
find
in interface org.kuali.rice.krad.data.DataObjectService
protected Object reduceCompoundKey(Object id)
id
- the potentially CompoundKey to reducepublic <T> org.kuali.rice.core.api.criteria.QueryResults<T> findMatching(Class<T> type, org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria)
findMatching
in interface org.kuali.rice.krad.data.DataObjectService
public <T> org.kuali.rice.core.api.criteria.QueryResults<T> findAll(Class<T> type)
findAll
in interface org.kuali.rice.krad.data.DataObjectService
public <T> T findUnique(Class<T> type, org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria)
findUnique
in interface org.kuali.rice.krad.data.DataObjectService
public void delete(Object dataObject)
delete
in interface org.kuali.rice.krad.data.DataObjectService
public <T> void deleteMatching(Class<T> type, org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria)
deleteMatching
in interface org.kuali.rice.krad.data.DataObjectService
public <T> void deleteAll(Class<T> type)
deleteAll
in interface org.kuali.rice.krad.data.DataObjectService
public <T> T save(T dataObject, org.kuali.rice.krad.data.PersistenceOption... options)
save
in interface org.kuali.rice.krad.data.DataObjectService
protected void pushOneToOneKeysToChildObjects(Object dataObject)
public org.kuali.rice.krad.data.metadata.MetadataRepository getMetadataRepository()
getMetadataRepository
in interface org.kuali.rice.krad.data.DataObjectService
public <T> T copyInstance(T dataObject, org.kuali.rice.krad.data.CopyOption... options)
copyInstance
in interface org.kuali.rice.krad.data.DataObjectService
public <T> org.kuali.rice.krad.data.DataObjectWrapper<T> wrap(T dataObject)
wrap
in interface org.kuali.rice.krad.data.DataObjectService
public <T> boolean supports(Class<T> type)
supports
in interface org.kuali.rice.krad.data.DataObjectService
protected org.kuali.rice.krad.data.provider.PersistenceProvider persistenceProviderForType(Class<?> type)
type
- the type for which to get the provider.RuntimeException
- if not PersistenceProvider handles given type.protected org.kuali.rice.krad.data.provider.PersistenceProvider persistenceProviderForObject(Object object)
object
- the object for which to get the provider.RuntimeException
- if not PersistenceProvider handles given type.IllegalArgumentException
- if null object passed in.public void flush(Class<?> type)
flush
in interface org.kuali.rice.krad.data.DataObjectService
public void setProviderRegistry(org.kuali.rice.krad.data.provider.ProviderRegistry providerRegistry)
providerRegistry
- the provider registry to set.public void setMetadataRepository(org.kuali.rice.krad.data.metadata.MetadataRepository metadataRepository)
metadataRepository
- the metadata repository to set.public org.kuali.rice.krad.data.util.ReferenceLinker getReferenceLinker()
public void setReferenceLinker(org.kuali.rice.krad.data.util.ReferenceLinker referenceLinker)
referenceLinker
- the reference linker to set.Copyright © 2004–2014 The Kuali Foundation. All rights reserved.