Class ProductCmptTocEntry
- java.lang.Object
-
- org.faktorips.runtime.internal.toc.TocEntry
-
- org.faktorips.runtime.internal.toc.TocEntryObject
-
- org.faktorips.runtime.internal.toc.ProductCmptTocEntry
-
public class ProductCmptTocEntry extends TocEntryObject
ATocEntryObjectforIProductComponents- Author:
- dirmeier
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROPERTY_GENERATION_IMPL_CLASS_NAMEstatic java.lang.StringPROPERTY_KIND_IDstatic java.lang.StringPROPERTY_VALID_TOstatic java.lang.StringPROPERTY_VERSION_IDstatic java.lang.StringXML_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
Constructors Constructor Description ProductCmptTocEntry(java.lang.String ipsObjectId, java.lang.String ipsObjectQualifiedName, java.lang.String kindId, java.lang.String versionId, java.lang.String xmlResourceName, java.lang.String implementationClassName, java.lang.String generationImplClassName, DateTime validTo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddToXml(org.w3c.dom.Element entryElement)Adds this instance's property values to the xml element.booleanequals(java.lang.Object obj)java.util.Optional<GenerationTocEntry>findGenerationEntry(java.util.Calendar effectiveDate)Returns an Optional containing the toc entry for the generation valid on the given effective date, or anempty Optionalif no generation is effective on the given date or the effective isnull.java.util.Optional<GenerationTocEntry>findGenerationEntry(DateTime validAt)Return an Optional containing the Generation Toc Entry for the exact valid atDateTime.java.util.Optional<GenerationTocEntry>findLatestGenerationEntry()Returns an Optional containing the latestGenerationTocEntrywith respect to the generations validity date.java.util.Optional<GenerationTocEntry>findNextGenerationEntry(java.util.Calendar validFrom)Returns an Optional containing theGenerationTocEntrysuccessor of the one that is found for the provided validity date.java.util.Optional<GenerationTocEntry>findPreviousGenerationEntry(java.util.Calendar validFrom)Returns an Optional containing theGenerationTocEntrythat is prior to the one that is found for the provided validity date.java.util.List<GenerationTocEntry>getGenerationEntries()Returns the generation entries or an empty array if this entry does not contain any generation entries.GenerationTocEntrygetGenerationEntry(java.util.Calendar effectiveDate)Returns the toc entry for the generation valid on the given effective date, ornullif no generation is effective on the given date or the effective isnull.GenerationTocEntrygetGenerationEntry(DateTime validAt)Return the Generation Toc Entry for the exact valid atDateTime.java.lang.StringgetGenerationImplClassName()Returns the name of the generation implementation classjava.lang.StringgetKindId()Returns the id of the product component kind, if this entry describes a product component, otherwise an empty string.GenerationTocEntrygetLatestGenerationEntry()Returns the latestGenerationTocEntrywith repect to the generations validity date.GenerationTocEntrygetNextGenerationEntry(java.util.Calendar validFrom)Returns theGenerationTocEntrysuccessor of the one that is found for the provided validity date.intgetNumberOfGenerationEntries()Returns the number of generation entries.GenerationTocEntrygetPreviousGenerationEntry(java.util.Calendar validFrom)Returns theGenerationTocEntrythat is prior to the one that is found for the provided validity date.DateTimegetValidTo()Returns the validTo date or null if the object doesn't supports a valid to attribute.java.lang.StringgetVersionId()Returns the version id if this entry describes a product component, otherwise an empty string.protected java.lang.StringgetXmlElementTag()Getting the xml element tag for this toc entryinthashCode()voidsetGenerationEntries(java.util.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
-
-
-
-
Field Detail
-
PROPERTY_KIND_ID
public static final java.lang.String PROPERTY_KIND_ID
- See Also:
- Constant Field Values
-
PROPERTY_VERSION_ID
public static final java.lang.String PROPERTY_VERSION_ID
- See Also:
- Constant Field Values
-
PROPERTY_VALID_TO
public static final java.lang.String PROPERTY_VALID_TO
- See Also:
- Constant Field Values
-
PROPERTY_GENERATION_IMPL_CLASS_NAME
public static final java.lang.String PROPERTY_GENERATION_IMPL_CLASS_NAME
- See Also:
- Constant Field Values
-
XML_TAG
public static final java.lang.String XML_TAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProductCmptTocEntry
public ProductCmptTocEntry(java.lang.String ipsObjectId, java.lang.String ipsObjectQualifiedName, java.lang.String kindId, java.lang.String versionId, java.lang.String xmlResourceName, java.lang.String implementationClassName, java.lang.String generationImplClassName, DateTime validTo)
-
-
Method Detail
-
getKindId
public java.lang.String getKindId()
Returns the id of the product component kind, if this entry describes a product component, otherwise an empty string.
-
getVersionId
public java.lang.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 java.util.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 generation entries.
-
getGenerationImplClassName
public java.lang.String getGenerationImplClassName()
Returns the name of the generation implementation class
-
setGenerationEntries
public void setGenerationEntries(java.util.List<GenerationTocEntry> entries)
Sets the generation entries.
-
getNextGenerationEntry
public GenerationTocEntry getNextGenerationEntry(java.util.Calendar validFrom)
Returns theGenerationTocEntrysuccessor of the one that is found for the provided validity date. Returnsnullif either no entry is found for the provided date or if the found one doesn't have a successor.
-
findNextGenerationEntry
public java.util.Optional<GenerationTocEntry> findNextGenerationEntry(java.util.Calendar validFrom)
Returns an Optional containing theGenerationTocEntrysuccessor of the one that is found for the provided validity date. Returns anempty Optionalif either no entry is found for the provided date or if the found one doesn't have a successor.
-
getPreviousGenerationEntry
public GenerationTocEntry getPreviousGenerationEntry(java.util.Calendar validFrom)
Returns theGenerationTocEntrythat is prior to the one that is found for the provided validity date. Returnsnullif either no entry is found for the provided date or if the found one doesn't have a predecessor.
-
findPreviousGenerationEntry
public java.util.Optional<GenerationTocEntry> findPreviousGenerationEntry(java.util.Calendar validFrom)
Returns an Optional containing theGenerationTocEntrythat is prior to the one that is found for the provided validity date. Returns anempty Optionalif 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 latestGenerationTocEntrywith repect to the generations validity date.
-
findLatestGenerationEntry
public java.util.Optional<GenerationTocEntry> findLatestGenerationEntry()
Returns an Optional containing the latestGenerationTocEntrywith respect to the generations validity date.
-
getGenerationEntry
public GenerationTocEntry getGenerationEntry(java.util.Calendar effectiveDate)
Returns the toc entry for the generation valid on the given effective date, ornullif no generation is effective on the given date or the effective isnull.
-
findGenerationEntry
public java.util.Optional<GenerationTocEntry> findGenerationEntry(java.util.Calendar effectiveDate)
Returns an Optional containing the toc entry for the generation valid on the given effective date, or anempty Optionalif no generation is effective on the given date or the effective isnull.
-
getGenerationEntry
public GenerationTocEntry getGenerationEntry(DateTime validAt)
Return the Generation Toc Entry for the exact valid atDateTime. This is the most effective way to get a generation toc entry
-
findGenerationEntry
public java.util.Optional<GenerationTocEntry> findGenerationEntry(DateTime validAt)
Return an Optional containing the Generation Toc Entry for the exact valid atDateTime. This is the most effective way to get a generation toc entry.
-
addToXml
protected void addToXml(org.w3c.dom.Element entryElement)
Description copied from class:TocEntryAdds this instance's property values to the xml element.- Overrides:
addToXmlin classTocEntryObject
-
getXmlElementTag
protected java.lang.String getXmlElementTag()
Description copied from class:TocEntryGetting the xml element tag for this toc entry- Specified by:
getXmlElementTagin classTocEntry
-
hashCode
public int hashCode()
- Overrides:
hashCodein classTocEntryObject
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classTocEntryObject
-
-