org.opensubsystems.inventory.data
Class Inventory

java.lang.Object
  extended by org.opensubsystems.core.data.DataObject
      extended by org.opensubsystems.core.data.BasicDataObject
          extended by org.opensubsystems.core.data.ModifiableDataObject
              extended by org.opensubsystems.inventory.data.Inventory
All Implemented Interfaces:
java.io.Serializable

public class Inventory
extends org.opensubsystems.core.data.ModifiableDataObject

Inventory tracks aggregates items available for order/issue/etc.

Version:
$Id: Inventory.java,v 1.10 2007/01/07 06:14:30 bastafidli Exp $
Author:
Martin Cerba
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.7 2006/02/18 05:31:32 bastafidli

Field Summary
static int[] ALL_FILTER_COLUMNS
          TODO: For Miro: This is not used for now so either we implement filters for it and then remove this to do or remove this attribute.
static int[] ALL_INVENTORY_COLUMNS
          Static variable for array of all columns codes.
static int COL_INVENTORY_CREATION_DATE
          Code for table column.
static int COL_INVENTORY_DESCRIPTION
          Code for table column.
static int COL_INVENTORY_DOMAIN_ID
          Code for table column.
static int COL_INVENTORY_ID
          Code for table column.
static int COL_INVENTORY_MODIFICATION_DATE
          Code for table column.
static int COL_INVENTORY_NAME
          Code for table column.
static java.lang.Integer COL_INVENTORY_NAME_OBJ
          Object code for table column.
static int[] DEFAULT_LIST_COLUMNS
          Default columns to retrieve when asked for list of objects.
static int[] DEFAULT_LIST_SORT_COLUMNS
          Default columns to sort by when asked for list of objects.
static java.lang.String[] DEFAULT_LIST_SORT_ORDER
          Default order in which the columns will be sorted.
protected  java.lang.String m_strDescription
          Description of the inventory
protected  java.lang.String m_strName
          Name of the inventory
protected static int s_iDescriptionMaxLength
          Maximal length of inventory description in chars
protected static int s_iNameMaxLength
          Maximal length of inventory name in chars
 
Fields inherited from class org.opensubsystems.core.data.ModifiableDataObject
m_modificationTimestamp
 
Fields inherited from class org.opensubsystems.core.data.BasicDataObject
m_creationTimestamp, m_iDomainId
 
Fields inherited from class org.opensubsystems.core.data.DataObject
NEW_ID, NEW_ID_OBJ, NEW_ID_STR
 
Constructor Summary
Inventory()
          Empty constructor
Inventory(int iDomainId)
          Constructor for new object.
Inventory(int iInventoryId, int iDomainId, java.lang.String strName, java.lang.String strDescription, java.sql.Timestamp creationDate, java.sql.Timestamp modificationDate)
          Full constructor
Inventory(int iDomainId, java.lang.String strName, java.lang.String strDescription)
          Constructor for new object.
 
Method Summary
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 boolean isSame(java.lang.Object oObject)
          
static void setDescriptionMaxLength(int iNewDescriptionMaxLength)
          Set static description max length parameter.
static void setNameMaxLength(int iNewNameMaxLength)
          Set static description max length parameter.
 
Methods inherited from class org.opensubsystems.core.data.ModifiableDataObject
equals, getModificationTimestamp, hashCode, restore, setModificationTimestamp
 
Methods inherited from class org.opensubsystems.core.data.BasicDataObject
getCreationTimestamp, getDomainId, getId, getIdAsObject, restore, setCreationTimestamp, setId
 
Methods inherited from class org.opensubsystems.core.data.DataObject
isFromPersistenceStore, setFromPersistenceStore
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COL_INVENTORY_ID

public static final int COL_INVENTORY_ID
Code for table column.

See Also:
Constant Field Values

COL_INVENTORY_DOMAIN_ID

public static final int COL_INVENTORY_DOMAIN_ID
Code for table column.

See Also:
Constant Field Values

COL_INVENTORY_NAME

public static final int COL_INVENTORY_NAME
Code for table column.

See Also:
Constant Field Values

COL_INVENTORY_NAME_OBJ

public static final java.lang.Integer COL_INVENTORY_NAME_OBJ
Object code for table column.


COL_INVENTORY_DESCRIPTION

public static final int COL_INVENTORY_DESCRIPTION
Code for table column.

See Also:
Constant Field Values

COL_INVENTORY_CREATION_DATE

public static final int COL_INVENTORY_CREATION_DATE
Code for table column.

See Also:
Constant Field Values

COL_INVENTORY_MODIFICATION_DATE

public static final int COL_INVENTORY_MODIFICATION_DATE
Code for table column.

See Also:
Constant Field Values

ALL_INVENTORY_COLUMNS

public static final int[] ALL_INVENTORY_COLUMNS
Static variable for array of all columns codes. The order is important since it is used to retrieve all data from the persistence store efficiently so do not modify it unless you make changes to other places as well.


ALL_FILTER_COLUMNS

public static final int[] ALL_FILTER_COLUMNS
TODO: For Miro: This is not used for now so either we implement filters for it and then remove this to do or remove this attribute.


DEFAULT_LIST_COLUMNS

public static final int[] DEFAULT_LIST_COLUMNS
Default columns to retrieve when asked for list of objects.


DEFAULT_LIST_SORT_COLUMNS

public static final int[] DEFAULT_LIST_SORT_COLUMNS
Default columns to sort by when asked for list of objects.


DEFAULT_LIST_SORT_ORDER

public static final java.lang.String[] DEFAULT_LIST_SORT_ORDER
Default order in which the columns will be sorted.


s_iNameMaxLength

protected static int s_iNameMaxLength
Maximal length of inventory name in chars


s_iDescriptionMaxLength

protected static int s_iDescriptionMaxLength
Maximal length of inventory description in chars


m_strName

protected java.lang.String m_strName
Name of the inventory


m_strDescription

protected java.lang.String m_strDescription
Description of the inventory

Constructor Detail

Inventory

public Inventory()
Empty constructor


Inventory

public Inventory(int iDomainId)
Constructor for new object.

Parameters:
iDomainId - - domain id

Inventory

public Inventory(int iDomainId,
                 java.lang.String strName,
                 java.lang.String strDescription)
Constructor for new object.

Parameters:
iDomainId - - domain id
strName - - inventory name
strDescription - - inventory description

Inventory

public Inventory(int iInventoryId,
                 int iDomainId,
                 java.lang.String strName,
                 java.lang.String strDescription,
                 java.sql.Timestamp creationDate,
                 java.sql.Timestamp modificationDate)
Full constructor

Parameters:
iInventoryId - - inventory id
iDomainId - - domain id
strName - - inventory name
strDescription - - inventory description
creationDate - - inventory creation date
modificationDate - - inventory last modification date
Method Detail

setNameMaxLength

public static void setNameMaxLength(int iNewNameMaxLength)
Set static description max length parameter. It is used by database layer to adjust this parameter based on database capabilities.

Parameters:
iNewNameMaxLength - - new description max length

setDescriptionMaxLength

public static void setDescriptionMaxLength(int iNewDescriptionMaxLength)
Set static description max length parameter. It is used by database layer to adjust this parameter based on database capabilities.

Parameters:
iNewDescriptionMaxLength - - new description max length

getName

public java.lang.String getName()
Returns:
String - Inventory name

getDescription

public java.lang.String getDescription()
Returns:
String - description of Inventory

isSame

public boolean isSame(java.lang.Object oObject)

Specified by:
isSame in class org.opensubsystems.core.data.DataObject


Copyright © 2003 - 2006 OpenSubsystems s.r.o.