org.faktorips.runtime.internal.toc
Class ProductCmptTocEntry

java.lang.Object
  extended by org.faktorips.runtime.internal.toc.TocEntry
      extended by org.faktorips.runtime.internal.toc.TocEntryObject
          extended by org.faktorips.runtime.internal.toc.ProductCmptTocEntry

public class ProductCmptTocEntry
extends TocEntryObject

A TocEntryObject for IProductComponents

Author:
dirmeier

Field Summary
static String PROPERTY_GENERATION_IMPL_CLASS_NAME
           
static String PROPERTY_KIND_ID
           
static String PROPERTY_VALID_TO
           
static String PROPERTY_VERSION_ID
           
static String XML_TAG
           
 
Fields inherited from class org.faktorips.runtime.internal.toc.TocEntryObject
PROPERTY_ENTRYTYPE, PROPERTY_IPS_OBJECT_ID, PROPERTY_IPS_OBJECT_QNAME
 
Fields inherited from class org.faktorips.runtime.internal.toc.TocEntry
PROPERTY_IMPLEMENTATION_CLASS, PROPERTY_XML_RESOURCE
 
Constructor Summary
ProductCmptTocEntry(String ipsObjectId, String ipsObjectQualifiedName, String kindId, String versionId, String xmlResourceName, String implementationClassName, String generationImplClassName, DateTime validTo)
           
 
Method Summary
protected  void addToXml(Element entryElement)
          Adds this instance's property values to the xml element.
 boolean equals(Object obj)
           
 List<GenerationTocEntry> getGenerationEntries()
          Returns the generation entries or an empty array if this entry does not contain any generation entries.
 GenerationTocEntry getGenerationEntry(Calendar effectiveDate)
          Returns the toc entry for the generation valid on the given effective date, or null if no generation is effective on the given date or the effective is null.
 GenerationTocEntry getGenerationEntry(DateTime validAt)
          Return the Generation Toc Entry for the exact valid at DateTime.
 String getGenerationImplClassName()
          Returns the name of the generation implementation class
 String getKindId()
          Returns the id of the product component kind, if this entry describes a product component, otherwise an empty string.
 GenerationTocEntry getLatestGenerationEntry()
          Returns the latest GenerationTocEntry with repect to the generations validity date.
 GenerationTocEntry getNextGenerationEntry(Calendar validFrom)
          Returns the GenerationTocEntry successor of the one that is found for the provided validity date.
 int getNumberOfGenerationEntries()
          Returns the number of genertion entries.
 GenerationTocEntry getPreviousGenerationEntry(Calendar validFrom)
          Returns the GenerationTocEntry that is prior to the one that is found for the provided validity date.
 DateTime getValidTo()
          Returns the validTo date or null if the object doesn't supports a valid to attribute.
 String getVersionId()
          Returns the version id if this entry describes a product component, otherwise an empty string.
protected  String getXmlElementTag()
          Getting the xml element tag for this toc entry
 int hashCode()
           
 void setGenerationEntries(List<GenerationTocEntry> entries)
          Sets the generation entries.
 
Methods inherited from class org.faktorips.runtime.internal.toc.TocEntryObject
getIpsObjectId, getIpsObjectQualifiedName, toString
 
Methods inherited from class org.faktorips.runtime.internal.toc.TocEntry
getImplementationClassName, getXmlResourceName, toXml
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_KIND_ID

public static final String PROPERTY_KIND_ID
See Also:
Constant Field Values

PROPERTY_VERSION_ID

public static final String PROPERTY_VERSION_ID
See Also:
Constant Field Values

PROPERTY_VALID_TO

public static final String PROPERTY_VALID_TO
See Also:
Constant Field Values

PROPERTY_GENERATION_IMPL_CLASS_NAME

public static final String PROPERTY_GENERATION_IMPL_CLASS_NAME
See Also:
Constant Field Values

XML_TAG

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

ProductCmptTocEntry

public ProductCmptTocEntry(String ipsObjectId,
                           String ipsObjectQualifiedName,
                           String kindId,
                           String versionId,
                           String xmlResourceName,
                           String implementationClassName,
                           String generationImplClassName,
                           DateTime validTo)
Method Detail

getKindId

public String getKindId()
Returns the id of the product component kind, if this entry describes a product component, otherwise an empty string.


getVersionId

public String getVersionId()
Returns the version id if this entry describes a product component, otherwise an empty string.


getValidTo

public DateTime getValidTo()
Returns the validTo date or null if the object doesn't supports a valid to attribute.


getGenerationEntries

public List<GenerationTocEntry> getGenerationEntries()
Returns the generation entries or an empty array if this entry does not contain any generation entries.


getNumberOfGenerationEntries

public int getNumberOfGenerationEntries()
Returns the number of genertion entries.


getGenerationImplClassName

public String getGenerationImplClassName()
Returns the name of the generation implementation class


setGenerationEntries

public void setGenerationEntries(List<GenerationTocEntry> entries)
Sets the generation entries.


getNextGenerationEntry

public GenerationTocEntry getNextGenerationEntry(Calendar validFrom)
Returns the GenerationTocEntry successor of the one that is found for the provided validity date. Returns null if either no entry is found for the provided date or if the found one doesn't have a successor.


getPreviousGenerationEntry

public GenerationTocEntry getPreviousGenerationEntry(Calendar validFrom)
Returns the GenerationTocEntry that is prior to the one that is found for the provided validity date. Returns null if either no entry is found for the provided date or if the found one doesn't have a predecessor.


getLatestGenerationEntry

public GenerationTocEntry getLatestGenerationEntry()
Returns the latest GenerationTocEntry with repect to the generations validity date.


getGenerationEntry

public GenerationTocEntry getGenerationEntry(Calendar effectiveDate)
Returns the toc entry for the generation valid on the given effective date, or null if no generation is effective on the given date or the effective is null.


getGenerationEntry

public GenerationTocEntry getGenerationEntry(DateTime validAt)
Return the Generation Toc Entry for the exact valid at DateTime. This is the most effective way to get a generation toc entry


addToXml

protected void addToXml(Element entryElement)
Description copied from class: TocEntry
Adds this instance's property values to the xml element.

Overrides:
addToXml in class TocEntryObject

getXmlElementTag

protected String getXmlElementTag()
Description copied from class: TocEntry
Getting the xml element tag for this toc entry

Specified by:
getXmlElementTag in class TocEntry

hashCode

public int hashCode()
Overrides:
hashCode in class TocEntryObject

equals

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


Copyright © 2015. All rights reserved.