com.vinculumtech.platform.root.vendor.jdo
Class JDOPersistenceSession

java.lang.Object
  extended bycom.vinculumtech.platform.root.PersistenceSession
      extended bycom.vinculumtech.platform.root.vendor.jdo.JDOPersistenceSession

public class JDOPersistenceSession
extends PersistenceSession

Version:
$Id: //depot/carrierwave/src/vendor/com/vinculumtech/platform/root/vendor/jdo/JDOPersistenceSession.java#10 $

Field Summary
 
Fields inherited from class com.vinculumtech.platform.root.PersistenceSession
REFERENCEABLE_NAME_FIELD
 
Constructor Summary
JDOPersistenceSession()
           
 
Method Summary
 void beginSession(boolean readOnly)
          Initialize the session for the current Thread.
 void commitSession()
          Perform any necessary cleanup before the session is completed.
 java.lang.Object createInstanceOf(java.lang.Class type)
          Create a new persistant instance of the given type.
 void deleteInstance(java.lang.Object object)
          Delete an object.
 java.util.List findAllInstancesOf(java.lang.Class type, boolean excludeSubclasses)
          Return a List of all objects of the given type.
If no object is found, an empty List is returned.
 java.lang.Object findInstanceOf(java.lang.Class type, java.lang.Object objectId)
          Return the existing object of the specified type with the given id.
If no object is found, null is returned.
 java.lang.Object findInstanceOf(java.lang.Class type, java.lang.String referenceableName)
          Return the existing object of the specified type with the given referenceableName.

Referenceable names are names that are more durable than the persistence tool object id, and are suitable for explicit referencing by remote applications.
 java.lang.Object getIdentityOf(java.lang.Object object)
           
static PersistenceManagerFactory getPersistenceManagerFactory()
           
 void rollbackSession()
          Rollback the current session.
 
Methods inherited from class com.vinculumtech.platform.root.PersistenceSession
findAllInstancesOf, findInstanceOf, getReferenceableNameField, getReferenceableNameOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDOPersistenceSession

public JDOPersistenceSession()
Method Detail

getPersistenceManagerFactory

public static PersistenceManagerFactory getPersistenceManagerFactory()

beginSession

public void beginSession(boolean readOnly)
Description copied from class: PersistenceSession
Initialize the session for the current Thread.

Specified by:
beginSession in class PersistenceSession
Parameters:
readOnly - Specifies whether this session will make modifications to domain objects or not

rollbackSession

public void rollbackSession()
Description copied from class: PersistenceSession
Rollback the current session.

Specified by:
rollbackSession in class PersistenceSession

commitSession

public void commitSession()
Description copied from class: PersistenceSession
Perform any necessary cleanup before the session is completed.

Specified by:
commitSession in class PersistenceSession

findInstanceOf

public java.lang.Object findInstanceOf(java.lang.Class type,
                                       java.lang.Object objectId)
Description copied from class: PersistenceSession
Return the existing object of the specified type with the given id.
If no object is found, null is returned.

Specified by:
findInstanceOf in class PersistenceSession
Parameters:
type -
objectId -
Returns:

findInstanceOf

public java.lang.Object findInstanceOf(java.lang.Class type,
                                       java.lang.String referenceableName)
Description copied from class: PersistenceSession
Return the existing object of the specified type with the given referenceableName.

Referenceable names are names that are more durable than the persistence tool object id, and are suitable for explicit referencing by remote applications. That is, it is not proper to require a client application to remember an object by its object id, that value should be opaque, but the client should be provided an URL like reference to its target object.

This method should use the value of PersistenceSession.REFERENCEABLE_NAME_FIELD when searching for the applicable object. Or it should use a custom naming scheme.

Specified by:
findInstanceOf in class PersistenceSession
Parameters:
type -
referenceableName -
Returns:

findAllInstancesOf

public java.util.List findAllInstancesOf(java.lang.Class type,
                                         boolean excludeSubclasses)
Description copied from class: PersistenceSession
Return a List of all objects of the given type.
If no object is found, an empty List is returned.

Specified by:
findAllInstancesOf in class PersistenceSession
Parameters:
type -
Returns:

createInstanceOf

public java.lang.Object createInstanceOf(java.lang.Class type)
Description copied from class: PersistenceSession
Create a new persistant instance of the given type.

Specified by:
createInstanceOf in class PersistenceSession
Parameters:
type -
Returns:

deleteInstance

public void deleteInstance(java.lang.Object object)
Description copied from class: PersistenceSession
Delete an object.

Specified by:
deleteInstance in class PersistenceSession
Parameters:
object -

getIdentityOf

public java.lang.Object getIdentityOf(java.lang.Object object)
Overrides:
getIdentityOf in class PersistenceSession


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.