Class DbProductDataProvider
java.lang.Object
org.faktorips.runtime.productdataprovider.AbstractProductDataProvider
org.faktorips.runtime.productdata.jpa.provider.DbProductDataProvider
- All Implemented Interfaces:
org.faktorips.runtime.productdataprovider.IProductDataProvider
public class DbProductDataProvider
extends org.faktorips.runtime.productdataprovider.AbstractProductDataProvider
IProductDataProvider using JPA to read product data from a database.-
Field Summary
Fields inherited from class org.faktorips.runtime.productdataprovider.AbstractProductDataProvider
MODIFIED_EXCEPTION_MESSAGE -
Constructor Summary
ConstructorsConstructorDescriptionDbProductDataProvider(String name, String modelVersion, ProductDatabase productDatabase) DbProductDataProvider(TocVersionEntity tocVersion, ProductDatabase productDatabase) Creates aDbProductDataProviderfor a givenTocVersionEntity. -
Method Summary
Modifier and TypeMethodDescriptiongetEnumContentAsStream(org.faktorips.runtime.internal.toc.EnumContentTocEntry enumContentTocEntry) getProductCmptData(org.faktorips.runtime.internal.toc.ProductCmptTocEntry tocEntry) getProductCmptGenerationData(org.faktorips.runtime.internal.toc.GenerationTocEntry tocEntry) getTableContentAsStream(org.faktorips.runtime.internal.toc.TableContentTocEntry tocEntry) getTestcaseElement(org.faktorips.runtime.internal.toc.TestCaseTocEntry arg0) org.faktorips.runtime.internal.toc.IReadonlyTableOfContentsgetToc()<T> ElementgetTocEntryData(org.faktorips.runtime.internal.toc.CustomTocEntryObject<T> arg0) Methods inherited from class org.faktorips.runtime.productdataprovider.AbstractProductDataProvider
getDocumentBuilder, getVersionChecker, isCompatibleToBaseVersion
-
Constructor Details
-
DbProductDataProvider
Creates aDbProductDataProviderfor a table of content identified bynameandversion. The givenEntityManageris used to read theDbTableOfContentsfrom the database and for up-to-date checks ingetBaseVersion().- Parameters:
name- the name identifying a table of contentsmodelVersion- the version of the model matching the product data contained in the table of contentsproductDatabase- theProductDatabaseBeanused for up-to-date checks ingetBaseVersion()
-
DbProductDataProvider
Creates aDbProductDataProviderfor a givenTocVersionEntity.- Parameters:
tocVersion- theTocVersionEntityread from the databaseproductDatabase- theProductDatabaseBeanused for up-to-date checks ingetBaseVersion()
-
-
Method Details
-
getEnumContentAsStream
public InputStream getEnumContentAsStream(org.faktorips.runtime.internal.toc.EnumContentTocEntry enumContentTocEntry) throws org.faktorips.runtime.productdataprovider.DataModifiedException - Throws:
org.faktorips.runtime.productdataprovider.DataModifiedException
-
getProductCmptData
public Element getProductCmptData(org.faktorips.runtime.internal.toc.ProductCmptTocEntry tocEntry) throws org.faktorips.runtime.productdataprovider.DataModifiedException - Throws:
org.faktorips.runtime.productdataprovider.DataModifiedException
-
getProductCmptGenerationData
public Element getProductCmptGenerationData(org.faktorips.runtime.internal.toc.GenerationTocEntry tocEntry) throws org.faktorips.runtime.productdataprovider.DataModifiedException - Throws:
org.faktorips.runtime.productdataprovider.DataModifiedException
-
getTableContentAsStream
public InputStream getTableContentAsStream(org.faktorips.runtime.internal.toc.TableContentTocEntry tocEntry) throws org.faktorips.runtime.productdataprovider.DataModifiedException - Throws:
org.faktorips.runtime.productdataprovider.DataModifiedException
-
getTestcaseElement
public Element getTestcaseElement(org.faktorips.runtime.internal.toc.TestCaseTocEntry arg0) throws org.faktorips.runtime.productdataprovider.DataModifiedException - Throws:
org.faktorips.runtime.productdataprovider.DataModifiedException
-
getToc
public org.faktorips.runtime.internal.toc.IReadonlyTableOfContents getToc() -
getTocEntryData
public <T> Element getTocEntryData(org.faktorips.runtime.internal.toc.CustomTocEntryObject<T> arg0) throws org.faktorips.runtime.productdataprovider.DataModifiedException - Throws:
org.faktorips.runtime.productdataprovider.DataModifiedException
-
getVersion
The initial
TocVersion's Version. -
getBaseVersion
The
versionof theTocVersionEntityfor the samenameandmodelVersionas the initialTocVersionEntity, currently marked asTocVersionEntity.Status.ACTIVE.- Specified by:
getBaseVersionin classorg.faktorips.runtime.productdataprovider.AbstractProductDataProvider
-