org.openorb.pss.connector.database

Class DatabaseSession

public class DatabaseSession extends DatabaseCatalog implements Session, DatabaseCatalogBase

This class is an implementation of database persistent session.

Author: Jerome Daniel

Constructor Summary
DatabaseSession()
Constructor without any parameter
DatabaseSession(ORBInitInfo info)
Constructor
Method Summary
voidclose()
PIDcreateHomePID(String storage_home_name)
Generate a Home PID
PIDcreatePID(PID home_pid, long index)
Generate a storage type PID
StorageObjectcreate_embedded_object(StorageHomeBase home_base, String storage_type_id)
This operation is used to create an embedded storage type
StorageObjectcreate_empty_object(StorageHomeBase home_base, String storage_type_id)
This operation is used to create a storage type
StorageObjectcreate_object(StorageHomeBase home_base, String storage_type_id)
This operation is used to create a storage type
voiddestroy(StorageHomeBase home)
PIDfind(PID home_pid, KeyBag[] keys)
This operation is used to find a storage type
StorageHomeBasefind_home_base(PID pid)
Returns an storage object home from its PID ( high part is only used )
PID[]find_pids(PID home_pid)
Returns all PIDs for this home
voidflush()
voidfree_all()
StringgetParameter(String parameter_name)
Return a parameter
StorageObjectincarnate(StorageHomeBase home_base, byte[] storage_type_pid, String storage_type_id)
This operation is used to incarnate a storage type
InputStream[]read(PID home_pid, PID type_pid, int nb_members)
This operation is used to get a input access for a storagetype from the datastore
voidrefresh()
voidremove(PID home_pid, PID type_pid)
This operation is used to delete a storage type
voidsetBaseInfo(DatabaseConnector connector, short access, Parameter[] parameters)
Set the base information require by a catalog
booleanstored(PID home_pid, PID type_pid)
This operation is used to check if a storage type is already stored
voidwrite(PID home_pid, PID type_pid, OutputStream[] output)
This operation is used to create a new entry into the datastore
voidwrite_entry_into_database(DatabaseEntry entry)
This operation is used to flush an entry into the database

Constructor Detail

DatabaseSession

public DatabaseSession()
Constructor without any parameter

DatabaseSession

public DatabaseSession(ORBInitInfo info)
Constructor

Method Detail

close

public void close()

createHomePID

public PID createHomePID(String storage_home_name)
Generate a Home PID

createPID

public PID createPID(PID home_pid, long index)
Generate a storage type PID

create_embedded_object

public StorageObject create_embedded_object(StorageHomeBase home_base, String storage_type_id)
This operation is used to create an embedded storage type

create_empty_object

public StorageObject create_empty_object(StorageHomeBase home_base, String storage_type_id)
This operation is used to create a storage type

create_object

public StorageObject create_object(StorageHomeBase home_base, String storage_type_id)
This operation is used to create a storage type

destroy

public void destroy(StorageHomeBase home)

find

public PID find(PID home_pid, KeyBag[] keys)
This operation is used to find a storage type

find_home_base

public StorageHomeBase find_home_base(PID pid)
Returns an storage object home from its PID ( high part is only used )

find_pids

public PID[] find_pids(PID home_pid)
Returns all PIDs for this home

flush

public void flush()

free_all

public void free_all()

getParameter

public String getParameter(String parameter_name)
Return a parameter

incarnate

public StorageObject incarnate(StorageHomeBase home_base, byte[] storage_type_pid, String storage_type_id)
This operation is used to incarnate a storage type

read

public InputStream[] read(PID home_pid, PID type_pid, int nb_members)
This operation is used to get a input access for a storagetype from the datastore

refresh

public void refresh()

remove

public void remove(PID home_pid, PID type_pid)
This operation is used to delete a storage type

setBaseInfo

public void setBaseInfo(DatabaseConnector connector, short access, Parameter[] parameters)
Set the base information require by a catalog

Parameters: connector the database connector access the access mode parameters parameters

Throws: NullPointerException if a supplier parameter is null

stored

public boolean stored(PID home_pid, PID type_pid)
This operation is used to check if a storage type is already stored

write

public void write(PID home_pid, PID type_pid, OutputStream[] output)
This operation is used to create a new entry into the datastore

write_entry_into_database

public void write_entry_into_database(DatabaseEntry entry)
This operation is used to flush an entry into the database