Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.sessions
Class Project

java.lang.Object
  extended byoracle.toplink.sessions.Project

All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
ProjectReader, ProjectWriter

public class Project
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Purpose: Maintain all of the TopLink configuration information for a system.

Responsibilities:

See Also:
DatabaseLogin, Serialized Form

Constructor Summary
Project()
PUBLIC: Create a new project.
Project(DatabaseLogin login)
PUBLIC: Create a new prject that will connect through JDBC using the login information.

Method Summary
void addAlias(java.lang.String alias, Descriptor descriptor)
PUBLIC: Add an alias for the descriptor
void addAliasesFromProject(Project project)
PUBLIC: Get the descriptors from the project, and associate the aliases for each descriptor with the descriptor.
void addDefaultReadOnlyClass(java.lang.Class readOnlyClass)
PUBLIC: Add the read-only class which apply to each UnitOfWork created by default.
void addDescriptors(Project project, oracle.toplink.publicinterface.DatabaseSession session)
PUBLIC: Merge the descriptors from another project into this one.
void assumeExistenceForDoesExist()
PUBLIC: Switch all descriptors to assume existence for non-null primary keys.
void checkCacheForDoesExist()
PUBLIC: Switch all descriptors to check the cache for existence.
void checkDatabaseForDoesExist()
PUBLIC: Switch all descriptors to check the database for existence.
DatabaseSession createDatabaseSession()
PUBLIC: Factory method to create session.
Server createServerSession()
PUBLIC: Factory method to create a server session.
Server createServerSession(ConnectionPolicy defaultConnectionPolicy)
PUBLIC: Factory method to create a server session.
Server createServerSession(int min, int max)
PUBLIC: Factory method to create a server session.
java.util.Vector getDefaultReadOnlyClasses()
PUBLIC: Returns the default set of read-only classes.
Descriptor getDescriptorForAlias(java.lang.String alias)
PUBLIC: Return the descriptor for the alias
java.util.Hashtable getDescriptors()
PUBLIC: Return the descriptors.
DatabaseLogin getLogin()
PUBLIC: Returns the login, the login was either read from the Builder project file or specified in code.
java.lang.String getName()
PUBLIC: get the name of the project.
void setDefaultReadOnlyClasses(java.util.Vector newValue)
PUBLIC: Set the read-only classes which apply to each UnitOfWork create by default.
void setLogin(DatabaseLogin login)
PUBLIC: Set the login to be used to connect to the database for this project.
void setName(java.lang.String name)
PUBLIC: Set the name of the project.
void useCacheIdentityMap()
PUBLIC: Switch all descriptors to use the cache identity map.
void useCacheIdentityMap(int cacheSize)
PUBLIC: Switch all descriptors to use the cache identity map the size.
void useFullIdentityMap()
PUBLIC: Switch all descriptors to use the full identity map.
void useFullIdentityMap(int initialCacheSize)
PUBLIC: Switch all descriptors to use the full identity map with initial cache size.
void useNoIdentityMap()
PUBLIC: Switch all descriptors to use no identity map.
void useSoftCacheWeakIdentityMap()
PUBLIC: Switch all descriptors to use the soft cache weak identity map.
void useSoftCacheWeakIdentityMap(int cacheSize)
PUBLIC: Switch all descriptors to use the soft cache weak identity map with soft cache size.
void useWeakIdentityMap()
PUBLIC: Switch all descriptors to use the weak identity map.
void useWeakIdentityMap(int initialCacheSize)
PUBLIC: Switch all descriptors to use the weak identity map.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

Project

public Project()
PUBLIC: Create a new project.

Project

public Project(DatabaseLogin login)
PUBLIC: Create a new prject that will connect through JDBC using the login information. This method can be used if the project is being create in code instead of being read from a file.

Method Detail

addDefaultReadOnlyClass

public void addDefaultReadOnlyClass(java.lang.Class readOnlyClass)
PUBLIC: Add the read-only class which apply to each UnitOfWork created by default.

addDescriptors

public void addDescriptors(Project project,
                           oracle.toplink.publicinterface.DatabaseSession session)
PUBLIC: Merge the descriptors from another project into this one. All persistent classes must have a descriptor registered for them with the session. This method allows for a batch of descriptors to be added at once so that TopLink can resolve the dependancies between the descriptors and perform initialization optimially.

assumeExistenceForDoesExist

public void assumeExistenceForDoesExist()
PUBLIC: Switch all descriptors to assume existence for non-null primary keys.

checkCacheForDoesExist

public void checkCacheForDoesExist()
PUBLIC: Switch all descriptors to check the cache for existence.

checkDatabaseForDoesExist

public void checkDatabaseForDoesExist()
PUBLIC: Switch all descriptors to check the database for existence.

createDatabaseSession

public DatabaseSession createDatabaseSession()
PUBLIC: Factory method to create session. This returns an implementor of the DatabaseSession interface, which can be used to login and add descriptors from other projects. The Session interface however should be used for reading and writing once connected for complete portability.

createServerSession

public Server createServerSession()
PUBLIC: Factory method to create a server session. This returns an implementor of the Server interface, which can be used to login and add descriptors from other projects, configure connection pooling and acquire client sessions.

createServerSession

public Server createServerSession(int min,
                                  int max)
PUBLIC: Factory method to create a server session. This returns an implementor of the Server interface, which can be used to login and add descriptors from other projects, configure connection pooling and acquire client sessions. Configure the min and max number of connections for the default pool.

createServerSession

public Server createServerSession(ConnectionPolicy defaultConnectionPolicy)
PUBLIC: Factory method to create a server session. This returns an implementor of the Server interface, which can be used to login and add descriptors from other projects, configure connection pooling and acquire client sessions. Configure the default connection policy to be used. This policy is used on the "acquireClientSession()" protocol.

getDefaultReadOnlyClasses

public java.util.Vector getDefaultReadOnlyClasses()
PUBLIC: Returns the default set of read-only classes.

getDescriptors

public java.util.Hashtable getDescriptors()
PUBLIC: Return the descriptors.

getLogin

public DatabaseLogin getLogin()
PUBLIC: Returns the login, the login was either read from the Builder project file or specified in code.

getName

public java.lang.String getName()
PUBLIC: get the name of the project.

setDefaultReadOnlyClasses

public void setDefaultReadOnlyClasses(java.util.Vector newValue)
PUBLIC: Set the read-only classes which apply to each UnitOfWork create by default.

setLogin

public void setLogin(DatabaseLogin login)
PUBLIC: Set the login to be used to connect to the database for this project.

setName

public void setName(java.lang.String name)
PUBLIC: Set the name of the project.

useCacheIdentityMap

public void useCacheIdentityMap()
PUBLIC: Switch all descriptors to use the cache identity map.

useCacheIdentityMap

public void useCacheIdentityMap(int cacheSize)
PUBLIC: Switch all descriptors to use the cache identity map the size.

useFullIdentityMap

public void useFullIdentityMap()
PUBLIC: Switch all descriptors to use the full identity map.

useFullIdentityMap

public void useFullIdentityMap(int initialCacheSize)
PUBLIC: Switch all descriptors to use the full identity map with initial cache size.

useNoIdentityMap

public void useNoIdentityMap()
PUBLIC: Switch all descriptors to use no identity map.

useSoftCacheWeakIdentityMap

public void useSoftCacheWeakIdentityMap()
PUBLIC: Switch all descriptors to use the soft cache weak identity map. Note JDK 1.2 is required for weak caches.

useSoftCacheWeakIdentityMap

public void useSoftCacheWeakIdentityMap(int cacheSize)
PUBLIC: Switch all descriptors to use the soft cache weak identity map with soft cache size. Note JDK 1.2 is required for weak caches.

useWeakIdentityMap

public void useWeakIdentityMap()
PUBLIC: Switch all descriptors to use the weak identity map. Note JDK 1.2 is required for weak caches.

useWeakIdentityMap

public void useWeakIdentityMap(int initialCacheSize)
PUBLIC: Switch all descriptors to use the weak identity map. Note JDK 1.2 is required for weak caches.

addAlias

public void addAlias(java.lang.String alias,
                     Descriptor descriptor)
PUBLIC: Add an alias for the descriptor

addAliasesFromProject

public void addAliasesFromProject(Project project)
PUBLIC: Get the descriptors from the project, and associate the aliases for each descriptor with the descriptor.

getDescriptorForAlias

public Descriptor getDescriptorForAlias(java.lang.String alias)
PUBLIC: Return the descriptor for the alias

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.