|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ozoneDB.AbstractFactory
org.ozoneDB.collections._BaseTreeMap_SubMap_keySetFactory
This class is generated by OPP. DO NOT EDIT, for it will be overwritten
the next time OPP is run for _BaseTreeMap_SubMap_keySetFactory
.
Factory pattern class for creating ozone objects.
A factory has a bit of a schizophrenic nature: on the client-side it 'links' to an ExternalDatabase, while on the server-side it does so to the Database that holds the instances that the factory creates. Note however that a factory running inside an Ozone server can also be linked to an External database outside that server (userclient -> server A -> server B). In that case such a factory would be 'linked' to an ExternalDatabase.The idea behind factories is threefold:
getDefault()
returns a factory that is
creates its objects inside that same server database and on the client side
it returns a factory that creates its objects in the default databasegetDefault() on the client side, you need to
call setDefaultDatabaseUrl(String)
to specify the default
database.
setDefaultDatabaseUrl(String)
on the client only
once, and for the rest of the programs lifespan call
_BaseTreeMap_SubMap_keySetFactory.getDefault().create()
methods both on the server and
client sides to create objects.
Note: if you do not have a clue what factories are and how they work, you should probably brush up on your knowledge of design patterns
.
Constructor Summary | |
_BaseTreeMap_SubMap_keySetFactory()
Default constructor: creates a factory that is liked to the default database. |
|
_BaseTreeMap_SubMap_keySetFactory(org.ozoneDB.AbstractFactory factory)
Creates a factory that creates its objects in the same database as a specific other fatory does. |
|
_BaseTreeMap_SubMap_keySetFactory(java.lang.String databaseUrl)
Creates a factory that creates its objects in the database specified by url . |
Method Summary | |
OzoneSet |
create(_BaseTreeMap_SubMap p0)
Creates a new database object |
OzoneSet |
create(org.ozoneDB.OzonePersonalMetaData personalMeta,
org.ozoneDB.OzoneSharedMetaData sharedMeta,
_BaseTreeMap_SubMap p0)
Creates a new database object with given metadata |
protected void |
defaultClosed()
Gets called automatically to indicate that the default database has been closed. |
static _BaseTreeMap_SubMap_keySetFactory |
getDefault()
On the client side: returns a factory that is linked to a database specified by the url passed to setDefaultDatabaseUrl . |
OzoneSet |
objectForHandle(java.lang.String handle)
Retrieves an object through its handle. |
OzoneSet |
objectForName(java.lang.String name)
Retrieves an object from the database through its name. |
Methods inherited from class org.ozoneDB.AbstractFactory |
addFactoryClassInfo, closeDatabase, finalize, getAutoClose, getDatabase, getDatabaseUrl, getDefaultDatabase, getDefaultDatabaseUrl, setAutoClose, setDefaultDatabaseUrl |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public _BaseTreeMap_SubMap_keySetFactory() throws java.lang.Exception
Default constructor: creates a factory that is liked to the default database.
public _BaseTreeMap_SubMap_keySetFactory(java.lang.String databaseUrl) throws java.lang.Exception
Creates a factory that creates its objects in the database specified by
url
. Note that this constructor can only be used if the database in
question is not opened by this client. Use _BaseTreeMap_SubMap_keySetFactory()
or
_BaseTreeMap_SubMap_keySetFactory(Factory)
to create a factory for an already opened
database. This might seem strange, or even annoying at first, but it is very
logical from an object oriented point of view: you probably want a factory that
creates its objects in the default database, or in the same realm as another
factory you already have created...
databaseUrl
- url defining the remote database (something like
ozone:remote://localhost:3333
)public _BaseTreeMap_SubMap_keySetFactory(org.ozoneDB.AbstractFactory factory)
Creates a factory that creates its objects in the same database as a specific other fatory does.
factory
- the factory that creates its objects in the same database as the new factory
shouldMethod Detail |
public static _BaseTreeMap_SubMap_keySetFactory getDefault() throws java.lang.Exception
setDefaultDatabaseUrl
. On the
server side: returns a factory that is linked to the server database.
Note that multiple calls to this method return the same value over and
over again, until setDefaultDatabaseUrl
has been called.
java.lang.Exception
protected void defaultClosed()
public OzoneSet objectForHandle(java.lang.String handle) throws java.lang.Exception
Retrieves an object through its handle.
java.lang.Exception
public OzoneSet objectForName(java.lang.String name) throws java.lang.Exception
Retrieves an object from the database through its name.
java.lang.Exception
public OzoneSet create(_BaseTreeMap_SubMap p0) throws java.lang.Exception
Creates a new database object
java.lang.Exception
public OzoneSet create(org.ozoneDB.OzonePersonalMetaData personalMeta, org.ozoneDB.OzoneSharedMetaData sharedMeta, _BaseTreeMap_SubMap p0) throws java.lang.Exception
Creates a new database object with given metadata
java.lang.Exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |