org.objectweb.jorm.api
Interface PMapCluster
public interface PMapCluster
The PMapCluster interface defines a the set of JORM classes which
mapping structures have to be managed altogether. It gives access to this
set of classes defined at mapping-time, and provides functions to control
the associated mapping structures.
- P. Dechamboux
void | addDependency(String jcname) - Add a dependency to the cluster
|
void | classDefined(String jcname)
|
void | createMappingStructures(boolean force) - Creates the mapping structures defined by this map cluster.
|
void | deleteData() - Deletes the data that have been inserted into the mapping structures
defined by this map cluster.
|
void | deleteMappingStructures() - Deletes all or part of the mapping structures defined by this map
cluster when they exist.
|
Collection | getClusterClasses() - Retrieves the collection of all JORM classes whose
mapping structures have to be controlled altogether.
|
Set | getUnResolvedDependencies()
|
boolean | isDefined() - Indicates if the mapping cluster is fully defined.
|
void | start() - Starts this map cluster.
|
void | stop() - Stops this map cluster.
|
void | updateMappingStructures() - Aligns existing mapping structures to the ones define by this map
cluster.
|
addDependency
public void addDependency(String jcname)
Add a dependency to the cluster
jcname
- the name of the jorm class
classDefined
public void classDefined(String jcname)
createMappingStructures
public void createMappingStructures(boolean force)
throws PException
Creates the mapping structures defined by this map cluster.
force
- If true, the creation of an existing table leads to an exception.
PException
- Thrown if it cannot be performed (especially
if all or some of these mapping structures already exist.
deleteData
public void deleteData()
throws PException
Deletes the data that have been inserted into the mapping structures
defined by this map cluster.
PException
- Thrown when the data store cannot perform this
operation.
deleteMappingStructures
public void deleteMappingStructures()
throws PException
Deletes all or part of the mapping structures defined by this map
cluster when they exist. If they contain some data, they are also
deleted.
PException
- Thrown when the data store cannot perform this
operation.
getClusterClasses
public Collection getClusterClasses()
Retrieves the collection of all JORM classes whose
mapping structures have to be controlled altogether.
- The collection of jorm class name included in this PMapCluster
(String)
getUnResolvedDependencies
public Set getUnResolvedDependencies()
- the collection of unresolved dependencies. This is the set of
jorm class names which must be mapped before starting the cluster.
isDefined
public boolean isDefined()
Indicates if the mapping cluster is fully defined.
- the 'true' value if the mapping cluster is fully defined, false
otherwise.
start
public void start()
throws PException
Starts this map cluster. The following operation cannot be executed
anymore: createMappingStructures, deleteMappingStructures, and
updateMappingStructures.
PException
-
updateMappingStructures
public void updateMappingStructures()
throws PException,
UnsupportedOperationException
Aligns existing mapping structures to the ones define by this map
cluster. This operation allows schema evolution on existing data store.
It is thus usually difficult to support in the general case.
PException
- Thrown when the data store cannot perform this
operation.