public class TdbDatabaseClusterDesign extends TdbSerializableObject implements com.tietoenator.trip.jxp.internal.utils.DOMSink
Constructor and Description |
---|
TdbDatabaseClusterDesign(TdbSession session)
Constructor, creates a new blank container
|
TdbDatabaseClusterDesign(TdbSession session,
TdbControlObject ob)
Constructor, creates a container for the cluster referenced by the
provided Control object
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String db)
Add a new member to the cluster, by name
|
void |
add(TdbControlObject ob)
Add the database or thesaurus referenced by the provided Control object as
a member of this cluster.
|
void |
changeMgr(java.lang.String newmgr)
Transfer all objects from the current user to a new manager.
|
void |
changeMgr(java.lang.String newmgr,
java.lang.String oldmgr)
Transfer all objects from one manager to another.
|
void |
changeMgr(java.lang.String newmgr,
java.lang.String oldmgr,
java.lang.String name)
Transfer ownership of one or more cluster designs from one user to another.
|
void |
copy(java.lang.String newname,
TdbControlObject newobj)
Copy the current cluster definition to a new name.
|
void |
deepCopy(java.lang.String newname,
TdbControlObject newobj)
Create a deep copy of the current cluster under a new name.
|
void |
delete()
Delete the current cluster design from the server.
|
void |
delete(java.lang.String name)
Delete the named cluster design from the server.
|
void |
export(java.lang.String filename)
Export the current cluster definition to the named file.
|
void |
export(java.lang.String filename,
java.lang.String name)
Export the named database cluster design to the named file.
|
void |
get()
Retrieve the current cluster's design from the server.
|
void |
get(boolean resolve)
Retrieve the current cluster's design from the server.
|
void |
get(java.lang.String name)
Retrieve the named cluster design from the server.
|
void |
get(java.lang.String name,
boolean resolve)
Retrieve the named cluster design from the server.
|
java.util.List<TdbFieldDesign> |
getCommonFields()
Return a list of fields common to all databases in the cluster.
|
java.util.List<TdbFieldDesign> |
getCommonFields(java.lang.String name)
Return a list of fields common to all databases in the cluster.
|
java.lang.String |
getDescription()
Retrieve any description or comment associated with the database cluster.
|
java.util.List<TdbDatabaseDesign> |
getMemberDesigns()
Return a list of database design objects for all databases in the
cluster, with nested clusters resolved.
|
java.util.List<TdbDatabaseDesign> |
getMemberDesigns(java.lang.String name)
Return a list of database design objects for all databases in the
cluster, with nested clusters resolved.
|
void |
importCluster(java.lang.String filename,
java.lang.String name)
Import a new cluster design from the named file.
|
void |
importUpdate(java.lang.String filename)
Import an update to the current cluster design from the named file.
|
void |
importUpdate(java.lang.String filename,
java.lang.String name)
Import an update to the named cluster design from the named file.
|
boolean |
isOwner()
Check if the calling user is the owner of the database cluster.
|
TdbControlObjectList |
members()
Retrieve the current set of members in the cluster.
|
void |
put()
Store the current cluster design to the server.
|
void |
put(java.lang.String name)
Store a new or modified cluster design to the server.
|
void |
remove(java.lang.String db)
Remove a named member from the cluster.
|
void |
remove(TdbControlObject ob)
Remove the referenced Control object member from this cluster.
|
void |
rename(java.lang.String newname)
Rename the current cluster design to a new name.
|
void |
setDescription(java.lang.String comment)
Establish a description or comment to associate with the database cluster.
|
void |
setMembers(TdbControlObjectList members)
Establish a new set of members in the cluster.
|
getControlObject
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages
cancel, getSession, isCancelable, setCancelable
public TdbDatabaseClusterDesign(TdbSession session) throws TdbException
session
- Active sessionTdbException
public TdbDatabaseClusterDesign(TdbSession session, TdbControlObject ob) throws TdbException
session
- Active sessionob
- Control object referencing the cluster desiredTdbException
public TdbControlObjectList members() throws TdbException
TdbException
public void setMembers(TdbControlObjectList members) throws TdbException
members
- The new membership set for the cluster.TdbException
public boolean isOwner()
public java.lang.String getDescription()
public void setDescription(java.lang.String comment)
comment
- Cluster commentpublic void add(java.lang.String db)
db
- The name of the member to add (either a database or a thesaurus)public void add(TdbControlObject ob)
ob
- The Control object reference to add as a memberpublic void remove(java.lang.String db) throws TdbException
db
- The name of the member to remove.TdbException
public void remove(TdbControlObject ob) throws TdbException
ob
- The Control object member to remove.TdbException
public void get(java.lang.String name) throws TdbException
This method causes network I/O.
name
- The name of the cluster to retrieveTdbException
public void get(java.lang.String name, boolean resolve) throws TdbException
This method causes network I/O.
name
- The name of the cluster to retrieveresolve
- Set to true to resolve nested clusters into their constituent databases. The resulting TdbDatabaseClusterDesign instance will not be possible to update.TdbException
public void get() throws TdbException
TdbException
public void get(boolean resolve) throws TdbException
resolve
- Set to true to resolve nested clusters into their constituent databases. The resulting TdbDatabaseClusterDesign instance will not be possible to update.TdbException
public void put(java.lang.String name) throws TdbException
This method causes network I/O.
name
- Name of the cluster design to storeTdbException
public void put() throws TdbException
get
method in order for this to succeed.
This method causes network I/O.
TdbException
public void export(java.lang.String filename, java.lang.String name) throws TdbException
This method causes network I/O.
filename
- File to which to export the designname
- Design to exportTdbException
public void export(java.lang.String filename) throws TdbException
This method causes network I/O.
filename
- File to which to export the designTdbException
public void importCluster(java.lang.String filename, java.lang.String name) throws TdbException
This method causes network I/O.
filename
- Name of file from which to importname
- Name of cluster design to createTdbException
public void importUpdate(java.lang.String filename, java.lang.String name) throws TdbException
This method causes network I/O.
filename
- Name of file from which to importname
- Name of cluster design to updateTdbException
public void importUpdate(java.lang.String filename) throws TdbException
This method causes network I/O.
filename
- Name of file from which to importTdbException
public void delete(java.lang.String name) throws TdbException
This method causes network I/O.
name
- Name of cluster design to deleteTdbException
public void delete() throws TdbException
This method causes network I/O.
TdbException
public void rename(java.lang.String newname) throws TdbException
This method causes network I/O.
newname
- The new name for the cluster designTdbException
public void copy(java.lang.String newname, TdbControlObject newobj) throws TdbException
This method causes network I/O.
newname
- Name of new copynewobj
- If not null on input, this object will contain the Control reference
for the new cluster on successful completionTdbException
public void deepCopy(java.lang.String newname, TdbControlObject newobj) throws TdbException
This method causes network I/O.
newname
- Name of new object to createnewobj
- If not null on input, this object will contain the Control reference
for the new cluster on successful completionTdbException
public void changeMgr(java.lang.String newmgr, java.lang.String oldmgr, java.lang.String name) throws TdbException
This method causes network I/O.
newmgr
- The name of the new owneroldmgr
- The name of the existing owner; if this is null, the name
of the calling user is assumed; if this is not null, and is not the name of the
calling user, the calling user must be the SYSTEM username
- The name of the object to transfer, or "*" for allTdbException
public void changeMgr(java.lang.String newmgr, java.lang.String oldmgr) throws TdbException
This method causes network I/O.
newmgr
- Name of the new manageroldmgr
- Name of the current manager; if this is not the name
of the calling user, the calling must be the SYSTEM user for this
to succeedTdbException
public void changeMgr(java.lang.String newmgr) throws TdbException
This method causes network I/O.
newmgr
- Name of the new managerTdbException
public java.util.List<TdbDatabaseDesign> getMemberDesigns(java.lang.String name) throws TdbException
TdbException
public java.util.List<TdbDatabaseDesign> getMemberDesigns() throws TdbException
TdbException
public java.util.List<TdbFieldDesign> getCommonFields(java.lang.String name) throws TdbException
Fields are considered common if they have the same name, same type and are in part or head record respectively.
Repeated calls with the same instance of TdbDatabaseClusterDesign will not cause any additional network I/O. If the information on common fields in a cluster is required repeatedly within the same session, the TdbDatabaseClusterDesign instance should be cached in order to reduce potentially expensive network I/O.
TdbException
public java.util.List<TdbFieldDesign> getCommonFields() throws TdbException
The cluster design must have been loaded prior to calling this method (alternatively use the getCommonFields(string) overload).
Fields are considered common if they have the same name, same type and are in part or head record respectively.
Repeated calls with the same instance of TdbDatabaseClusterDesign will not cause any additional network I/O. If the information on common fields in a cluster is required repeatedly within the same session, the TdbDatabaseClusterDesign instance should be cached in order to reduce potentially expensive network I/O.
TdbException