com.arsdigita.dmi
Class Product

java.lang.Object
  extended bycom.arsdigita.dmi.Product

public class Product
extends Object


Field Summary
static String versionId
           
 
Constructor Summary
Product()
          Constructs a new Product
Product(BigDecimal productID)
          Constructs a new Product with the ID, productID
Product(String sName)
          Constructs a new Product with the name, sName
 
Method Summary
static Product createProduct(String sName, String sProdDesc, String sInitVersionName, String sInstallFile, String sVersionDesc)
          Creates and returns a new Product with initial version, sInitVersionName.
 Date getCreationDate()
          Returns the date of this product was first installed
 ProductVersion getCurrentVersion()
          Returns the current version of the product
 String getDesc()
          Returns a description of this product
 BigDecimal getID()
          Returns the ID of this product
 String getName()
          Returns the name of this product
static Product[] getProducts()
          Returns all the products that are currently installed
 ProductVersion[] getVersions()
          Returns a list of all the versions through which this product has been installed and upgraded
 void save()
          Saves this product's information to the database.
 void setDescription(String sDesc)
          Sets this product's description to sDesc
 void setName(String sName)
          Sets this product's name to sName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

Product

public Product()
Constructs a new Product


Product

public Product(BigDecimal productID)
        throws SQLException
Constructs a new Product with the ID, productID

Parameters:
productID - the ID of the product to instantiate
Throws:
throws - a SQLException if there was a database error or if there is no product with ID, productID
SQLException

Product

public Product(String sName)
        throws SQLException
Constructs a new Product with the name, sName

Parameters:
sName - name of the product to instantiate
Throws:
throws - a SQLException if there was a database error or if there is no product with name, sName
SQLException
Method Detail

createProduct

public static Product createProduct(String sName,
                                    String sProdDesc,
                                    String sInitVersionName,
                                    String sInstallFile,
                                    String sVersionDesc)
                             throws SQLException
Creates and returns a new Product with initial version, sInitVersionName. Installs the data model for this product in the process

Parameters:
sName - name of the product
sProdDesc - description of the product
sInitVersionName - initial version of the product being created
sInstallFile - location of the SQLPlus-compatible file from which to install the product's data model
sVersionDesc - description of the initial version of the product
Returns:
the Product that was created
Throws:
SQLException

getCurrentVersion

public ProductVersion getCurrentVersion()
                                 throws SQLException
Returns the current version of the product

Returns:
the current version of the product
Throws:
SQLException

getVersions

public ProductVersion[] getVersions()
                             throws SQLException
Returns a list of all the versions through which this product has been installed and upgraded

Returns:
an array of all ProductVersions for this Product
Throws:
SQLException

getID

public BigDecimal getID()
Returns the ID of this product

Returns:
the ID of this product

getName

public String getName()
Returns the name of this product

Returns:
the name of this product

setName

public void setName(String sName)
Sets this product's name to sName

Parameters:
sName - the new name of the product

getCreationDate

public Date getCreationDate()
Returns the date of this product was first installed

Returns:
the date this product was first installed

getDesc

public String getDesc()
Returns a description of this product

Returns:
a description of this product

setDescription

public void setDescription(String sDesc)
                    throws IllegalStateException
Sets this product's description to sDesc

Throws:
IllegalStateException

save

public void save()
          throws SQLException
Saves this product's information to the database.

Throws:
SQLException

getProducts

public static Product[] getProducts()
                             throws SQLException
Returns all the products that are currently installed

Returns:
an array of Products
Throws:
SQLException


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC