org.apache.ojb.broker
Interface PersistenceBrokerInternal

All Superinterfaces:
org.apache.ojb.broker.util.configuration.Configurable, ObjectContainer, PersistenceBroker
All Known Implementing Classes:
DelegatingPersistenceBroker, PersistenceBrokerAbstractImpl, PersistenceBrokerFactorySyncImpl.PersistenceBrokerSyncImpl, PersistenceBrokerHandle, PersistenceBrokerImpl, PoolablePersistenceBroker

public interface PersistenceBrokerInternal
extends PersistenceBroker

Extended version of the PersistenceBroker specifying additional functionality that is only relevant internally.

Version:
$Id: PersistenceBrokerInternal.java 365252 2005-12-29 22:47:48Z tomdz $
Author:
Armin Waibel

Method Summary
 void checkRefreshRelationships(java.lang.Object obj, Identity oid, ClassDescriptor cld)
          Refreshes the references of the given object whose refresh is set to true.
 java.lang.Object createProxy(java.lang.Class proxyClass, Identity realSubjectsIdentity)
          Shortcut method for creating a proxy of the given type.
 void delete(java.lang.Object obj, boolean ignoreReferences)
          Deletes the persistence representation of the given object in the underlying persistence system.
 ProxyFactory getProxyFactory()
          Return the factory for creating proxies.
 QueryReferenceBroker getReferenceBroker()
          Returns the broker specifically for retrieving references via query.
 RelationshipPrefetcherFactory getRelationshipPrefetcherFactory()
          Return the factory for creating relationship prefetcher objects.
 boolean isManaged()
          Determines whether this instance is handled by a managed environment, i.e. whether it is registered within a JTA transaction.
 void setManaged(boolean managed)
          Specifies whether this instance is handled by a managed environment, i.e. whether it is registered within a JTA transaction.
 void store(java.lang.Object obj, Identity oid, ClassDescriptor cld, boolean insert, boolean ignoreReferences)
          Performs the real store work (insert or update) and is intended for use by top-level apis internally.
 
Methods inherited from interface org.apache.ojb.broker.PersistenceBroker
abortTransaction, addListener, addListener, addMtoNImplementor, beginTransaction, clearCache, close, commitTransaction, delete, deleteByQuery, deleteMtoNImplementor, fireBrokerEvent, fireBrokerEvent, fireBrokerEvent, getClassDescriptor, getCollectionByQuery, getCollectionByQuery, getCount, getDescriptorRepository, getIteratorByQuery, getObjectByIdentity, getObjectByQuery, getPBKey, getPKEnumerationByQuery, getReportQueryIteratorByQuery, getTopLevelClass, hasClassDescriptor, isClosed, isInTransaction, removeAllListeners, removeAllListeners, removeFromCache, removeListener, retrieveAllReferences, retrieveReference, serviceBrokerHelper, serviceConnectionManager, serviceIdentity, serviceJdbcAccess, serviceObjectCache, serviceSequenceManager, serviceSqlGenerator, serviceStatementManager, store, store
 
Methods inherited from interface org.apache.ojb.broker.util.configuration.Configurable
configure
 
Methods inherited from interface org.odbms.ObjectContainer
query
 

Method Detail

isManaged

boolean isManaged()
Determines whether this instance is handled by a managed environment, i.e. whether it is registered within a JTA transaction.

Returns:
true if this broker is managed

setManaged

void setManaged(boolean managed)
Specifies whether this instance is handled by a managed environment, i.e. whether it is registered within a JTA transaction. Note that on PersistenceBroker.close() this will automatically be reset to false.

Parameters:
managed - true if this broker is managed

store

void store(java.lang.Object obj,
           Identity oid,
           ClassDescriptor cld,
           boolean insert,
           boolean ignoreReferences)
Performs the real store work (insert or update) and is intended for use by top-level apis internally.

Parameters:
obj - The object to store
oid - The identity of the object to store
cld - The class descriptor of the object
insert - If true an insert operation will be performed, else update operation
ignoreReferences - Whether automatic storing of contained references/collections (except super-references) shall be suppressed (independent of the auto-update setting in the metadata)

delete

void delete(java.lang.Object obj,
            boolean ignoreReferences)
            throws PersistenceBrokerException
Deletes the persistence representation of the given object in the underlying persistence system. This method is intended for use in top-level apis internally.

Parameters:
obj - The object to delete
ignoreReferences - Whether automatic deletion of contained references/collections (except super-references) shall be suppressed (independent of the auto-delete setting in the metadata)
Throws:
PersistenceBrokerException

getReferenceBroker

QueryReferenceBroker getReferenceBroker()
Returns the broker specifically for retrieving references via query.

Returns:
The query reference broker

checkRefreshRelationships

void checkRefreshRelationships(java.lang.Object obj,
                               Identity oid,
                               ClassDescriptor cld)
Refreshes the references of the given object whose refresh is set to true.

Parameters:
obj - The object to check
oid - The identity of the object
cld - The class descriptor for the object

getRelationshipPrefetcherFactory

RelationshipPrefetcherFactory getRelationshipPrefetcherFactory()
Return the factory for creating relationship prefetcher objects.

Returns:
The factory

getProxyFactory

ProxyFactory getProxyFactory()
Return the factory for creating proxies.

Returns:
The factory

createProxy

java.lang.Object createProxy(java.lang.Class proxyClass,
                             Identity realSubjectsIdentity)
Shortcut method for creating a proxy of the given type.

Parameters:
proxyClass - The proxy type
realSubjectsIdentity - The identity of the real subject
Returns:
The proxy


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30