|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ozoneDB.AbstractFactory
org.ozoneDB.collections.NodeTreeSetImplFactory
This class is generated by OPP. DO NOT EDIT, for it will be overwritten
the next time OPP is run for NodeTreeSetImplFactory
.
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
NodeTreeSetImplFactory.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 | |
NodeTreeSetImplFactory()
Default constructor: creates a factory that is liked to the default database. |
|
NodeTreeSetImplFactory(org.ozoneDB.AbstractFactory factory)
Creates a factory that creates its objects in the same database as a specific other fatory does. |
|
NodeTreeSetImplFactory(java.lang.String databaseUrl)
Creates a factory that creates its objects in the database specified by url . |
Method Summary | |
NodeTreeSet |
create()
Creates a new database object |
NodeTreeSet |
create(java.util.Collection p0)
Creates a new database object |
NodeTreeSet |
create(java.util.Comparator p0)
Creates a new database object |
NodeTreeSet |
create(org.ozoneDB.OzonePersonalMetaData personalMeta,
org.ozoneDB.OzoneSharedMetaData sharedMeta)
Creates a new database object with given metadata |
NodeTreeSet |
create(org.ozoneDB.OzonePersonalMetaData personalMeta,
org.ozoneDB.OzoneSharedMetaData sharedMeta,
java.util.Collection p0)
Creates a new database object with given metadata |
NodeTreeSet |
create(org.ozoneDB.OzonePersonalMetaData personalMeta,
org.ozoneDB.OzoneSharedMetaData sharedMeta,
java.util.Comparator p0)
Creates a new database object with given metadata |
NodeTreeSet |
create(org.ozoneDB.OzonePersonalMetaData personalMeta,
org.ozoneDB.OzoneSharedMetaData sharedMeta,
java.util.SortedSet p0)
Creates a new database object with given metadata |
NodeTreeSet |
create(java.util.SortedSet p0)
Creates a new database object |
protected void |
defaultClosed()
Gets called automatically to indicate that the default database has been closed. |
static NodeTreeSetImplFactory |
getDefault()
On the client side: returns a factory that is linked to a database specified by the url passed to setDefaultDatabaseUrl . |
NodeTreeSet |
objectForHandle(java.lang.String handle)
Retrieves an object through its handle. |
NodeTreeSet |
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 NodeTreeSetImplFactory() throws java.lang.Exception
Default constructor: creates a factory that is liked to the default database.
public NodeTreeSetImplFactory(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 NodeTreeSetImplFactory()
or
NodeTreeSetImplFactory(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 NodeTreeSetImplFactory(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 NodeTreeSetImplFactory 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 NodeTreeSet objectForHandle(java.lang.String handle) throws java.lang.Exception
Retrieves an object through its handle.
java.lang.Exception
public NodeTreeSet objectForName(java.lang.String name) throws java.lang.Exception
Retrieves an object from the database through its name.
java.lang.Exception
public NodeTreeSet create() throws java.lang.Exception
Creates a new database object
java.lang.Exception
public NodeTreeSet create(org.ozoneDB.OzonePersonalMetaData personalMeta, org.ozoneDB.OzoneSharedMetaData sharedMeta) throws java.lang.Exception
Creates a new database object with given metadata
java.lang.Exception
public NodeTreeSet create(java.util.Comparator p0) throws java.lang.Exception
Creates a new database object
java.lang.Exception
public NodeTreeSet create(org.ozoneDB.OzonePersonalMetaData personalMeta, org.ozoneDB.OzoneSharedMetaData sharedMeta, java.util.Comparator p0) throws java.lang.Exception
Creates a new database object with given metadata
java.lang.Exception
public NodeTreeSet create(java.util.Collection p0) throws java.lang.Exception
Creates a new database object
java.lang.Exception
public NodeTreeSet create(org.ozoneDB.OzonePersonalMetaData personalMeta, org.ozoneDB.OzoneSharedMetaData sharedMeta, java.util.Collection p0) throws java.lang.Exception
Creates a new database object with given metadata
java.lang.Exception
public NodeTreeSet create(java.util.SortedSet p0) throws java.lang.Exception
Creates a new database object
java.lang.Exception
public NodeTreeSet create(org.ozoneDB.OzonePersonalMetaData personalMeta, org.ozoneDB.OzoneSharedMetaData sharedMeta, java.util.SortedSet 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 |