com.openexchange.admin.rmi.dataobjects
Class Database

java.lang.Object
  extended by com.openexchange.admin.rmi.dataobjects.EnforceableDataObject
      extended by com.openexchange.admin.rmi.dataobjects.Database
All Implemented Interfaces:
NameAndIdObject, Serializable, Cloneable

public class Database
extends EnforceableDataObject
implements NameAndIdObject

This class represents a database.

Author:
Manuel Kraft, Carsten Hoeger, Dennis Sieben
See Also:
Serialized Form

Constructor Summary
Database()
           
Database(int id)
           
Database(int id, String schema)
           
Database(String login, String password, String driver, String url, int id, String displayname)
           
Database(String login, String password, String driver, String url, String scheme)
           
 
Method Summary
 boolean equals(Object obj)
           
 Integer getClusterWeight()
           
 Integer getCurrentUnits()
           
 String getDriver()
           
 Integer getId()
          Returns the id of this object
 String getLogin()
           
 String[] getMandatoryMembersChange()
          At the moment no fields are defined here
 String[] getMandatoryMembersCreate()
          At the moment setId(java.lang.Integer), setDriver(java.lang.String), setUrl(java.lang.String) and setScheme(java.lang.String) are defined here
 String[] getMandatoryMembersDelete()
          At the moment setDriver(java.lang.String), setUrl(java.lang.String), setScheme(java.lang.String), setPassword(java.lang.String) and setLogin(java.lang.String) are defined here
 String[] getMandatoryMembersRegister()
          At the moment setPassword(java.lang.String), setName(java.lang.String) and setMaster(java.lang.Boolean) are defined here
 Boolean getMaster()
           
 Integer getMasterId()
           
 Integer getMaxUnits()
           
 String getName()
          Returns the name of this object
 String getPassword()
           
 Integer getPoolHardLimit()
           
 Integer getPoolInitial()
           
 Integer getPoolMax()
           
 Integer getRead_id()
           
 String getScheme()
           
 String getUrl()
           
 int hashCode()
           
 boolean isClusterWeightset()
           
 boolean isCurrentUnitsset()
           
 boolean isDriverset()
           
 boolean isIdset()
           
 boolean isLoginset()
           
 Boolean isMaster()
           
 boolean isMasterIdset()
           
 boolean isMasterset()
           
 boolean isMaxUnitsset()
           
 boolean isNameset()
           
 boolean isPasswordset()
           
 boolean isPoolHardLimitset()
           
 boolean isPoolInitialset()
           
 boolean isPoolMaxset()
           
 boolean isRead_idset()
           
 boolean isSchemeset()
           
 boolean isUrlset()
           
 void setClusterWeight(Integer clusterWeight)
          The system weight factor of this database in percent, value is Integer This value defines how contexts will be distributed over multiple databases/db pools.
 void setCurrentUnits(Integer units)
           
 void setDriver(String val)
           
 void setId(Integer val)
          Sets the id for this object
 void setLogin(String val)
           
 void setMaster(Boolean master)
           
 void setMasterId(Integer masterId)
           
 void setMaxUnits(Integer maxunits)
           
 void setName(String val)
          Sets the name for this object
 void setPassword(String val)
           
 void setPoolHardLimit(Integer poolHardLimit)
           
 void setPoolInitial(Integer poolInitial)
           
 void setPoolMax(Integer poolMax)
           
 void setRead_id(Integer read_id)
           
 void setScheme(String scheme)
           
 void setUrl(String val)
           
 String toString()
          
 
Methods inherited from class com.openexchange.admin.rmi.dataobjects.EnforceableDataObject
getUnsetMembers, mandatoryChangeMembersSet, mandatoryCreateMembersSet, mandatoryDeleteMembersSet, mandatoryRegisterMembersSet, testMandatoryCreateFieldsNull
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Database

public Database(int id)
Parameters:
id -

Database

public Database(int id,
                String schema)
Parameters:
id -
schema -

Database

public Database(String login,
                String password,
                String driver,
                String url,
                int id,
                String displayname)
Parameters:
login -
password -
driver -
url -
id -
displayname -

Database

public Database()

Database

public Database(String login,
                String password,
                String driver,
                String url,
                String scheme)
Parameters:
login -
password -
driver -
url -
scheme -
Method Detail

getId

public Integer getId()
Description copied from interface: NameAndIdObject
Returns the id of this object

Specified by:
getId in interface NameAndIdObject
Returns:
An Integer object containing the id

setId

public void setId(Integer val)
Description copied from interface: NameAndIdObject
Sets the id for this object

Specified by:
setId in interface NameAndIdObject
Parameters:
val - An Integer object containing the id

getUrl

public String getUrl()

setUrl

public void setUrl(String val)

getLogin

public String getLogin()

setLogin

public void setLogin(String val)

getPassword

public String getPassword()

setPassword

public void setPassword(String val)

getName

public String getName()
Description copied from interface: NameAndIdObject
Returns the name of this object

Specified by:
getName in interface NameAndIdObject
Returns:
A String containing the name

setName

public void setName(String val)
Description copied from interface: NameAndIdObject
Sets the name for this object

Specified by:
setName in interface NameAndIdObject
Parameters:
val - A String containing the name

getDriver

public String getDriver()

setDriver

public void setDriver(String val)

getScheme

public String getScheme()

setScheme

public void setScheme(String scheme)

getClusterWeight

public Integer getClusterWeight()

setClusterWeight

public void setClusterWeight(Integer clusterWeight)
The system weight factor of this database in percent, value is Integer This value defines how contexts will be distributed over multiple databases/db pools.


getMaxUnits

public Integer getMaxUnits()

setMaxUnits

public void setMaxUnits(Integer maxunits)

getPoolInitial

public Integer getPoolInitial()

setPoolInitial

public void setPoolInitial(Integer poolInitial)

getPoolMax

public Integer getPoolMax()

setPoolMax

public void setPoolMax(Integer poolMax)

getMasterId

public Integer getMasterId()

setMasterId

public void setMasterId(Integer masterId)

isMaster

public Boolean isMaster()

setMaster

public void setMaster(Boolean master)

getRead_id

public Integer getRead_id()

setRead_id

public void setRead_id(Integer read_id)

getCurrentUnits

public Integer getCurrentUnits()

setCurrentUnits

public void setCurrentUnits(Integer units)

getPoolHardLimit

public Integer getPoolHardLimit()

setPoolHardLimit

public void setPoolHardLimit(Integer poolHardLimit)

toString

public String toString()
Description copied from class: EnforceableDataObject

Overrides:
toString in class EnforceableDataObject

getMandatoryMembersChange

public String[] getMandatoryMembersChange()
At the moment no fields are defined here

Specified by:
getMandatoryMembersChange in class EnforceableDataObject
Returns:
String array containing names of mandatory members or null if unwanted

getMandatoryMembersCreate

public String[] getMandatoryMembersCreate()
At the moment setId(java.lang.Integer), setDriver(java.lang.String), setUrl(java.lang.String) and setScheme(java.lang.String) are defined here

Specified by:
getMandatoryMembersCreate in class EnforceableDataObject
Returns:
String array containing names of mandatory members or null if unwanted

getMandatoryMembersDelete

public String[] getMandatoryMembersDelete()
At the moment setDriver(java.lang.String), setUrl(java.lang.String), setScheme(java.lang.String), setPassword(java.lang.String) and setLogin(java.lang.String) are defined here

Specified by:
getMandatoryMembersDelete in class EnforceableDataObject
Returns:
String array containing names of mandatory members or null if unwanted

getMandatoryMembersRegister

public String[] getMandatoryMembersRegister()
At the moment setPassword(java.lang.String), setName(java.lang.String) and setMaster(java.lang.Boolean) are defined here

Specified by:
getMandatoryMembersRegister in class EnforceableDataObject
Returns:
String array containing names of mandatory members or null if unwanted

isClusterWeightset

public boolean isClusterWeightset()
Returns:
the clusterWeightset

isCurrentUnitsset

public boolean isCurrentUnitsset()
Returns:
the currentUnitsset

isDriverset

public boolean isDriverset()
Returns:
the driverset

isIdset

public boolean isIdset()
Returns:
the idset

isLoginset

public boolean isLoginset()
Returns:
the loginset

isMasterIdset

public boolean isMasterIdset()
Returns:
the masterIdset

isMasterset

public boolean isMasterset()
Returns:
the masterset

isMaxUnitsset

public boolean isMaxUnitsset()
Returns:
the maxUnitsset

isNameset

public boolean isNameset()
Returns:
the nameset

isPasswordset

public boolean isPasswordset()
Returns:
the passwordset

isPoolHardLimitset

public boolean isPoolHardLimitset()
Returns:
the poolHardLimitset

isPoolInitialset

public boolean isPoolInitialset()
Returns:
the poolInitialset

isPoolMaxset

public boolean isPoolMaxset()
Returns:
the poolMaxset

isRead_idset

public boolean isRead_idset()
Returns:
the read_idset

isSchemeset

public boolean isSchemeset()
Returns:
the schemeset

isUrlset

public boolean isUrlset()
Returns:
the urlset

hashCode

public int hashCode()
Overrides:
hashCode in class EnforceableDataObject

equals

public boolean equals(Object obj)
Overrides:
equals in class EnforceableDataObject

getMaster

public Boolean getMaster()