com.arsdigita.dmi
Class ProductVersion

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

public class ProductVersion
extends Object


Field Summary
static String versionId
           
 
Constructor Summary
ProductVersion()
          Constructs a new ProductVersion
ProductVersion(BigDecimal versionID, Product p)
          Constructs a new ProductVersion for Product p with the ID, versionID
ProductVersion(String sName, Product p)
          Constructs a new ProductVersion for Product p with the name, sName
 
Method Summary
static ProductVersion createProductVersion(Product p, String sName, String sInstallFile, String sDesc)
          Creates and returns a new Product Version for p.
 Date getCreationDate()
          returns the date this version was installed
 String getDesc()
          returns the ID of this version
 BigDecimal getID()
          returns the ID of this version
 String getInstallErrors()
          returns the ID of this version
 String getInstallFileName()
          returns the install file of this version's data model
 BigDecimal getLatestProductVersionID()
          Returns the ID for the Product Version that is current for this's Product.
 String getName()
          returns the name of this version
 ProductVersion getPreviousVersion()
          Returns the previous version of this product which was installed.
 Product getProduct()
          returns the Product for which this is a version
 void save()
          Saves this product version's information to the database.
 void setDescription(String sDesc)
          sets the description of this version to sDesc
 void setName(String sName)
          sets this' 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

ProductVersion

public ProductVersion()
Constructs a new ProductVersion


ProductVersion

public ProductVersion(BigDecimal versionID,
                      Product p)
               throws SQLException
Constructs a new ProductVersion for Product p with the ID, versionID

Parameters:
p - the Product for which to create a ProductVersion
Throws:
throws - a SQLException if there was a database error or if there is no product version with ID, versionID
SQLException

ProductVersion

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

Parameters:
p - the Product for which to create a ProductVersion
sName - the name of the product version to instantiate
Throws:
throws - a SQLException if there was a database error or if there is no product version with name, sName
SQLException
Method Detail

createProductVersion

public static ProductVersion createProductVersion(Product p,
                                                  String sName,
                                                  String sInstallFile,
                                                  String sDesc)
                                           throws SQLException,
                                                  IllegalStateException
Creates and returns a new Product Version for p. Installs the data model for this product version in the process

Parameters:
p - the Product for which to create a new version
sName - the name of the version
sInstallFile - location of the SQLPlus-compatible file from which to install the product's data model
sDesc - description of this version
Returns:
the Product that was created
Throws:
SQLException
IllegalStateException

getProduct

public Product getProduct()
returns the Product for which this is a version

Returns:
the Product for which this is a version

getID

public BigDecimal getID()
returns the ID of this version

Returns:
the ID of this version

getName

public String getName()
returns the name of this version

Returns:
the name of this version

setName

public void setName(String sName)
sets this' name to sName


getCreationDate

public Date getCreationDate()
returns the date this version was installed

Returns:
the date this version was installed

getInstallFileName

public String getInstallFileName()
returns the install file of this version's data model

Returns:
the install file of this version's data model

getInstallErrors

public String getInstallErrors()
returns the ID of this version

Returns:
the ID of this version. Null if there were no errors

getDesc

public String getDesc()
returns the ID of this version

Returns:
the ID of this version

setDescription

public void setDescription(String sDesc)
sets the description of this version to sDesc

Parameters:
sDesc - the description of this version

getPreviousVersion

public ProductVersion getPreviousVersion()
                                  throws SQLException
Returns the previous version of this product which was installed. Null if there was no previous version installed

Returns:
the previous version of this product which was installed. Null if there was no previous version installed
Throws:
SQLException

getLatestProductVersionID

public BigDecimal getLatestProductVersionID()
                                     throws SQLException
Returns the ID for the Product Version that is current for this's Product.

Returns:
the ID for the Product Version that is current for this's Product
Throws:
SQLException

save

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

Throws:
throws - an IllegalStateException if this product version was created with a default constructor and consequently does not have a Product
SQLException
IllegalStateException


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