Documentation of 'org.neodatis.odb.impl.main.ThreadSafeLocalODB' Java class
ThreadSafeLocalODB
org.neodatis.odb.impl.main

Class ThreadSafeLocalODB

  • All Implemented Interfaces:
    ODB


    public class ThreadSafeLocalODB
    extends java.lang.Object
    implements ODB
    Used to synchronized access to the db in multi thread.
    • Constructor Detail

      • ThreadSafeLocalODB

        public ThreadSafeLocalODB(ODB odb)
    • Method Detail

      • getNonThreadSafeOdb

        public ODB getNonThreadSafeOdb()
      • addDeleteTrigger

        public void addDeleteTrigger(java.lang.Class clazz,
                                     DeleteTrigger trigger)
        Description copied from interface: ODB
        USed to add a delete trigger callback for the specific class
        Specified by:
        addDeleteTrigger in interface ODB
      • addInsertTrigger

        public void addInsertTrigger(java.lang.Class clazz,
                                     InsertTrigger trigger)
        Description copied from interface: ODB
        Used to add an insert trigger callback for the specific class
        Specified by:
        addInsertTrigger in interface ODB
      • addSelectTrigger

        public void addSelectTrigger(java.lang.Class clazz,
                                     SelectTrigger trigger)
        Description copied from interface: ODB
        Used to add a select trigger callback for the specific class
        Specified by:
        addSelectTrigger in interface ODB
      • addUpdateTrigger

        public void addUpdateTrigger(java.lang.Class clazz,
                                     UpdateTrigger trigger)
        Description copied from interface: ODB
        Used to add an update trigger callback for the specific class
        Specified by:
        addUpdateTrigger in interface ODB
      • close

        public void close()
        Description copied from interface: ODB
        Closes the database. Automatically commit uncommitted changes
        Specified by:
        close in interface ODB
      • commit

        public void commit()
        Description copied from interface: ODB
        Commit all the change of the database @
        Specified by:
        commit in interface ODB
      • count

        public java.math.BigInteger count(CriteriaQuery query)
        Description copied from interface: ODB
        Returns the number of objects that satisfy the query
        Specified by:
        count in interface ODB
        Returns:
        The number of objects that satisfy the query
      • defragmentTo

        public void defragmentTo(java.lang.String newFileName)
        Description copied from interface: ODB
        Defragment ODB Database
        Specified by:
        defragmentTo in interface ODB
      • delete

        public OID delete(java.lang.Object object)
        Description copied from interface: ODB
        Delete an object from database
        Specified by:
        delete in interface ODB
      • deleteCascade

        public OID deleteCascade(java.lang.Object object)
        Description copied from interface: ODB
        Delete an object and all its sub objects
        Specified by:
        deleteCascade in interface ODB
        Returns:
      • deleteObjectWithId

        public void deleteObjectWithId(OID oid)
        Description copied from interface: ODB
        Delete an object from the database with the id
        Specified by:
        deleteObjectWithId in interface ODB
        Parameters:
        oid - The object id to be deleted
      • disconnect

        public void disconnect(java.lang.Object object)
        Description copied from interface: ODB
        Used to disconnect the object from the current session. The object is removed from the cache
        Specified by:
        disconnect in interface ODB
      • ext

        public ODBExt ext()
        Description copied from interface: ODB
        Get the extension of ODB to get access to advanced functions
        Specified by:
        ext in interface ODB
      • getClassRepresentation

        public ClassRepresentation getClassRepresentation(java.lang.Class clazz)
        Description copied from interface: ODB
        Get an abstract representation of a class
        Specified by:
        getClassRepresentation in interface ODB
        Returns:
        a public meta-representation of a class
      • getClassRepresentation

        public ClassRepresentation getClassRepresentation(java.lang.String fullClassName)
        Description copied from interface: ODB
        Get an abstract representation of a class
        Specified by:
        getClassRepresentation in interface ODB
        Returns:
        a public meta-representation of a class
      • getName

        public java.lang.String getName()
        Description copied from interface: ODB
        Return the name of the database
        Specified by:
        getName in interface ODB
        Returns:
        the file name in local mode and the base id (alias) in client server mode.
      • getObjectFromId

        public java.lang.Object getObjectFromId(OID id)
        Description copied from interface: ODB
        Get the object with a specific id *
        Specified by:
        getObjectFromId in interface ODB
        Returns:
        The object with the specific id @
      • getObjectId

        public OID getObjectId(java.lang.Object object)
        Description copied from interface: ODB
        Get the id of an ODB-aware object
        Specified by:
        getObjectId in interface ODB
        Returns:
        The ODB internal object id
      • getObjects

        public <T> Objects<T> getObjects(java.lang.Class clazz,
                                         boolean inMemory,
                                         int startIndex,
                                         int endIndex)
        Specified by:
        getObjects in interface ODB
        Parameters:
        clazz - The type of the objects
        inMemory - if true, preload all objects,if false,load on demand
        startIndex - The index of the first object
        endIndex - The index of the last object that must be returned
        Returns:
        A List of objects
      • getObjects

        public <T> Objects<T> getObjects(java.lang.Class clazz,
                                         boolean inMemory)
        Description copied from interface: ODB
        Get all objects of a specific type
        Specified by:
        getObjects in interface ODB
        Parameters:
        clazz - The type of the objects
        inMemory - if true, preload all objects,if false,load on demand
        Returns:
        The list of objects
      • getObjects

        public <T> Objects<T> getObjects(java.lang.Class clazz)
        Description copied from interface: ODB
        Get all objects of a specific type
        Specified by:
        getObjects in interface ODB
        Parameters:
        clazz - The type of the objects
        Returns:
        The list of objects
      • getObjects

        public <T> Objects<T> getObjects(IQuery query,
                                         boolean inMemory,
                                         int startIndex,
                                         int endIndex)
        Description copied from interface: ODB
        Return a list of objects that matches the query
        Specified by:
        getObjects in interface ODB
        inMemory - if true, preload all objects,if false,load on demand
        startIndex - The index of the first object
        endIndex - The index of the last object that must be returned
        Returns:
        A List of objects, if start index and end index are -1, they are ignored. If not, the length of the sublist is endIndex - startIndex
      • getObjects

        public <T> Objects<T> getObjects(IQuery query,
                                         boolean inMemory)
        Description copied from interface: ODB
        Search for objects that matches the native query.
        Specified by:
        getObjects in interface ODB
        Returns:
        The list of objects
      • getObjects

        public <T> Objects<T> getObjects(IQuery query)
        Description copied from interface: ODB
        Search for objects that matches the query.
        Specified by:
        getObjects in interface ODB
        Returns:
        The list of objects
      • getRefactorManager

        public IRefactorManager getRefactorManager()
        Description copied from interface: ODB
        Returns the object used to refactor the database
        Specified by:
        getRefactorManager in interface ODB
      • getValues

        public Values getValues(IValuesQuery query)
        Description copied from interface: ODB
        Search for objects that matches the query.
        Specified by:
        getValues in interface ODB
        Returns:
        The list of values
      • isClosed

        public boolean isClosed()
        Specified by:
        isClosed in interface ODB
        Returns:
      • reconnect

        public void reconnect(java.lang.Object object)
        Specified by:
        reconnect in interface ODB
      • rollback

        public void rollback()
        Description copied from interface: ODB
        Undo all uncommitted changes
        Specified by:
        rollback in interface ODB
      • store

        public OID store(java.lang.Object object)
        Description copied from interface: ODB
        Store a plain java Object in the ODB Database
        Specified by:
        store in interface ODB
        Parameters:
        object - A plain Java Object

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.