com.knowgate.addrbook
Class Room

java.lang.Object
  extended by com.knowgate.dataobjs.DBPersist
      extended by com.knowgate.addrbook.Room
All Implemented Interfaces:
java.io.Serializable, java.util.Map

public class Room
extends DBPersist

Meeting Room or other type of Resource used at Meeting

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
static short ClassId
           
 
Fields inherited from class com.knowgate.dataobjs.DBPersist
AllVals, sAuditCls, sAuditUsr, sTransactId
 
Constructor Summary
Room()
           
 
Method Summary
 boolean delete(JDCConnection oConn)
          Delete a register from database The deleted register will be the one matching this DBPersist primary key, as set at constructor or load() method.
static boolean delete(JDCConnection oConn, java.lang.String sRoomNm, java.lang.String sWrkAId)
          Delete Room Calls k_sp_del_room stored procedure
 java.lang.String getMeetingForDate(JDCConnection oConn, java.util.Date dtFrom, java.util.Date dtTo)
          Get meeting that takes place at this room on given dates
 boolean isAvailable(JDCConnection oConn, java.util.Date dtFrom, java.util.Date dtTo)
          Check whether or not this room is available between two dates
 boolean load(JDCConnection oConn, java.lang.Object[] NmRoomGuWrkA)
          Load Room
 boolean load(JDCConnection oConn, java.lang.Object sNmRoom, java.lang.Object sGuWorkArea)
          Load Room
 
Methods inherited from class com.knowgate.dataobjs.DBPersist
allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getInteger, getIntervalPart, getItemMap, getItems, getMoney, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, size, store, toLowerCase, toUpperCase, toXML, toXML, toXML, toXML, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

ClassId

public static final short ClassId
See Also:
Constant Field Values
Constructor Detail

Room

public Room()
Method Detail

load

public boolean load(JDCConnection oConn,
                    java.lang.Object sNmRoom,
                    java.lang.Object sGuWorkArea)
             throws java.sql.SQLException
Load Room

Parameters:
oConn - JDCConnection
sNmRoom - String Room name
sGuWorkArea - String WorkArea Guid
Returns:
boolean
Throws:
java.sql.SQLException

load

public boolean load(JDCConnection oConn,
                    java.lang.Object[] NmRoomGuWrkA)
             throws java.sql.SQLException
Load Room

Overrides:
load in class DBPersist
Parameters:
oConn - JDCConnection
NmRoomGuWrkA - Object[] { Room Name, WorkArea Guid}
Returns:
boolean
Throws:
java.sql.SQLException

delete

public boolean delete(JDCConnection oConn)
               throws java.sql.SQLException
Description copied from class: DBPersist

Delete a register from database

The deleted register will be the one matching this DBPersist primary key, as set at constructor or load() method.

Overrides:
delete in class DBPersist
Parameters:
oConn - Database connection
Returns:
true if register was successfully erased, false if not.
Throws:
java.sql.SQLException

getMeetingForDate

public java.lang.String getMeetingForDate(JDCConnection oConn,
                                          java.util.Date dtFrom,
                                          java.util.Date dtTo)
                                   throws java.sql.SQLException
Get meeting that takes place at this room on given dates

Parameters:
oConn - JDCConnection
dtFrom - Date From
dtTo - Date To
Returns:
String GUID of meeting taking place or null if room is available at that time.
Throws:
java.sql.SQLException
Since:
3.0

isAvailable

public boolean isAvailable(JDCConnection oConn,
                           java.util.Date dtFrom,
                           java.util.Date dtTo)
                    throws java.sql.SQLException
Check whether or not this room is available between two dates

Parameters:
oConn - JDCConnection
dtFrom - Date From
dtTo - Date To
Returns:
boolean true if room is available on given dates, false otherwise.
Throws:
java.sql.SQLException
Since:
3.0

delete

public static boolean delete(JDCConnection oConn,
                             java.lang.String sRoomNm,
                             java.lang.String sWrkAId)
                      throws java.sql.SQLException

Delete Room

Calls k_sp_del_room stored procedure

Parameters:
oConn - Database Connection
sRoomNm - Room Name
sWrkAId - Identifier of WorkArea to witch Room belongs
Throws:
java.sql.SQLException