org.neodatis.odb.impl.main
Class DefaultClassRepresentation

java.lang.Object
  extended by org.neodatis.odb.impl.main.DefaultClassRepresentation
All Implemented Interfaces:
java.io.Serializable, ClassRepresentation

public class DefaultClassRepresentation
extends java.lang.Object
implements ClassRepresentation

See Also:
Serialized Form

Constructor Summary
DefaultClassRepresentation(IStorageEngine storageEngine, ClassInfo classInfo)
           
 
Method Summary
 void addFullInstantiationHelper(FullInstantiationHelper instantiationHelper)
          Adds an helper to tell ODB what class to call to create an instance
 void addIndexOn(java.lang.String name, java.lang.String[] indexFields, boolean verbose)
           
 void addInstantiationHelper(InstantiationHelper instantiationHelper)
          Adds an helper to tell ODB what class to call to create an instance
 void addParameterHelper(ParameterHelper parameterHelper)
          Adds an helper to tell ODB how to create an instance when no default constructor is available
 void addUniqueIndexOn(java.lang.String name, java.lang.String[] indexFields, boolean verbose)
           
 void deleteIndex(java.lang.String indexName, boolean verbose)
           
 void doNotPersistAttribute(java.lang.String attributeName)
           
 boolean existIndex(java.lang.String indexName)
          To check if an index exist
 java.util.List<java.lang.String> getIndexDescriptions()
           
 void persistAttribute(java.lang.String attributeName)
           
 void rebuildIndex(java.lang.String indexName, boolean verbose)
          Used to rebuild an index
 void removeFullInstantiationHelper()
          Remove the instantiation helper of this class, if exists
 void removeInstantiationHelper()
          Remove the instantiation helper of this class, if exists
 void removeParameterHelper()
          Remove the parameter helper for this class, if exists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultClassRepresentation

public DefaultClassRepresentation(IStorageEngine storageEngine,
                                  ClassInfo classInfo)
Method Detail

addUniqueIndexOn

public void addUniqueIndexOn(java.lang.String name,
                             java.lang.String[] indexFields,
                             boolean verbose)
Specified by:
addUniqueIndexOn in interface ClassRepresentation
Parameters:
name - The name of the index
indexFields - The list of fields of the index
verbose - A boolean value to indicate of ODB must describe what it is doing

addIndexOn

public void addIndexOn(java.lang.String name,
                       java.lang.String[] indexFields,
                       boolean verbose)
Specified by:
addIndexOn in interface ClassRepresentation
Parameters:
name - The name of the index
indexFields - The list of fields of the index
verbose - A boolean value to indicate of ODB must describe what it is doing

addInstantiationHelper

public void addInstantiationHelper(InstantiationHelper instantiationHelper)
Description copied from interface: ClassRepresentation
Adds an helper to tell ODB what class to call to create an instance

Specified by:
addInstantiationHelper in interface ClassRepresentation

addFullInstantiationHelper

public void addFullInstantiationHelper(FullInstantiationHelper instantiationHelper)
Description copied from interface: ClassRepresentation
Adds an helper to tell ODB what class to call to create an instance

Specified by:
addFullInstantiationHelper in interface ClassRepresentation

addParameterHelper

public void addParameterHelper(ParameterHelper parameterHelper)
Description copied from interface: ClassRepresentation
Adds an helper to tell ODB how to create an instance when no default constructor is available

Specified by:
addParameterHelper in interface ClassRepresentation

removeInstantiationHelper

public void removeInstantiationHelper()
Description copied from interface: ClassRepresentation
Remove the instantiation helper of this class, if exists

Specified by:
removeInstantiationHelper in interface ClassRepresentation

removeFullInstantiationHelper

public void removeFullInstantiationHelper()
Description copied from interface: ClassRepresentation
Remove the instantiation helper of this class, if exists

Specified by:
removeFullInstantiationHelper in interface ClassRepresentation

removeParameterHelper

public void removeParameterHelper()
Description copied from interface: ClassRepresentation
Remove the parameter helper for this class, if exists

Specified by:
removeParameterHelper in interface ClassRepresentation

existIndex

public boolean existIndex(java.lang.String indexName)
Description copied from interface: ClassRepresentation
To check if an index exist

Specified by:
existIndex in interface ClassRepresentation
Returns:

rebuildIndex

public void rebuildIndex(java.lang.String indexName,
                         boolean verbose)
Used to rebuild an index

Specified by:
rebuildIndex in interface ClassRepresentation

deleteIndex

public void deleteIndex(java.lang.String indexName,
                        boolean verbose)
Specified by:
deleteIndex in interface ClassRepresentation

getIndexDescriptions

public java.util.List<java.lang.String> getIndexDescriptions()
Specified by:
getIndexDescriptions in interface ClassRepresentation

doNotPersistAttribute

public void doNotPersistAttribute(java.lang.String attributeName)
Specified by:
doNotPersistAttribute in interface ClassRepresentation

persistAttribute

public void persistAttribute(java.lang.String attributeName)
Specified by:
persistAttribute in interface ClassRepresentation