|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faktorips.runtime.internal.AbstractRuntimeRepository
org.faktorips.runtime.internal.AbstractCachingRuntimeRepository
org.faktorips.runtime.internal.AbstractTocBasedRuntimeRepository
public abstract class AbstractTocBasedRuntimeRepository
Abstract base implementation of runtime repository that uses a table of contents to lazily load the product data. This implementation also manages the caches.
| Constructor Summary | |
|---|---|
AbstractTocBasedRuntimeRepository(String name,
ICacheFactory cacheFactory,
ClassLoader cl)
|
|
| Method Summary | ||
|---|---|---|
protected abstract
|
createCustomObject(CustomTocEntryObject<T> tocEntry)
|
|
protected abstract
|
createEnumValues(EnumContentTocEntry tocEntry,
Class<T> clazz)
|
|
protected XmlAdapter<String,?> |
createEnumXmlAdapter(String className,
IRuntimeRepository repository)
Creates and returns an XmlAdapter instance for the provided class name. |
|
protected abstract IProductComponent |
createProductCmpt(ProductCmptTocEntry tocEntry)
|
|
protected abstract IProductComponentGeneration |
createProductCmptGeneration(GenerationTocEntry generationTocEntry)
|
|
protected abstract ITable |
createTable(TableContentTocEntry tocEntry)
Creates the table object for the given toc entry. |
|
protected abstract IpsTestCaseBase |
createTestCase(TestCaseTocEntry tocEntry,
IRuntimeRepository runtimeRepository)
Creates the test case object for the given toc entry. |
|
protected void |
getAllIpsTestCases(List<IpsTest2> result,
IRuntimeRepository runtimeRepository)
Same as AbstractRuntimeRepository.getAllIpsTestCases(IRuntimeRepository) but searches only in this repository
and not the ones, this repository depends on. |
|
protected void |
getAllModelTypeImplementationClasses(Set<String> result)
Same as getAllModelTypeImplementationClasses() but searches only in this repository and not the ones, this repository depends on. |
|
void |
getAllProductComponentIds(List<String> result)
Same as getAllProductComponentIds() but searches only in this repository and not the ones, this repository depends on. |
|
void |
getAllProductComponents(List<IProductComponent> result)
Same as getAllProductComponents() but searches only in this repository and not the ones, this repository depends on. |
|
void |
getAllProductComponents(String kindId,
List<IProductComponent> result)
Same as getAllProductComponent(String kindId) but searches only in this repository and not the ones, this repository depends on. |
|
void |
getAllTables(List<ITable> result)
Same as getAllTables() but searches only in this repository and not the ones,
this repository depends on. |
|
protected Class<?> |
getClass(String className,
ClassLoader cl)
Returns the class for the given qualified class name. |
|
protected IpsTestCaseBase |
getIpsTestCaseInternal(String qName,
IRuntimeRepository runtimeRepository)
IpsTestCases are created new every time and should not be cached because the test data could change for every test creation. |
|
protected void |
getIpsTestCasesStartingWith(String qNamePrefix,
List<IpsTest2> result,
IRuntimeRepository runtimeRepository)
Gets all ips test cases starting with the given qualified name prefix. |
|
protected IProductComponentGeneration |
getLatestProductComponentGenerationInternal(IProductComponent productCmpt)
|
|
protected IProductComponentGeneration |
getNextProductComponentGenerationInternal(IProductComponentGeneration generation)
|
|
protected
|
getNotCachedCustomObject(Class<T> type,
String id)
|
|
protected
|
getNotCachedEnumValues(Class<T> clazz)
|
|
protected List<XmlAdapter<?,?>> |
getNotCachedEnumXmlAdapter(IRuntimeRepository repository)
|
|
protected IProductComponent |
getNotCachedProductComponent(String id)
|
|
protected IProductComponentGeneration |
getNotCachedProductComponentGeneration(GenerationId generationId)
|
|
protected ITable |
getNotCachedTable(String qualifiedTableName)
|
|
protected int |
getNumberOfProductComponentGenerationsInternal(IProductComponent productCmpt)
|
|
protected IProductComponentGeneration |
getPreviousProductComponentGenerationInternal(IProductComponentGeneration generation)
|
|
protected IProductComponentGeneration |
getProductComponentGenerationInternal(String id,
Calendar effectiveDate)
Same as getProductComponentGeneration(String id, Calendar effectiveDate) but searches only in this repository and not the ones, this repository depends on. |
|
void |
getProductComponentGenerations(IProductComponent productCmpt,
List<IProductComponentGeneration> result)
Same as getProductComponentGenerations() but searches only in this repository and not the ones, this repository depends on. |
|
protected IProductComponent |
getProductComponentInternal(String kindId,
String versionId)
Same as getProductComponent(String kindId, String versionId) but searches only in this repository and not the ones, this repository depends on. |
|
protected
|
getTableInternal(Class<T> tableClass)
Same as AbstractRuntimeRepository.getTable(Class) but searches only in this repository and not the ones, this
repository depends on. |
|
protected IReadonlyTableOfContents |
getTableOfContents()
|
|
protected void |
initialize()
Initializes the runtime repository by loading the table of contents. |
|
protected abstract IReadonlyTableOfContents |
loadTableOfContents()
|
|
| Methods inherited from class org.faktorips.runtime.internal.AbstractCachingRuntimeRepository |
|---|
getAllInternalEnumXmlAdapters, getCustomRuntimeObjectInternal, getEnumValuesInternal, getProductComponentGenerationInternal, getProductComponentInternal, getTableInternal, initCaches |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.faktorips.runtime.IRuntimeRepository |
|---|
isModifiable |
| Constructor Detail |
|---|
public AbstractTocBasedRuntimeRepository(String name,
ICacheFactory cacheFactory,
ClassLoader cl)
| Method Detail |
|---|
protected abstract IReadonlyTableOfContents loadTableOfContents()
protected IReadonlyTableOfContents getTableOfContents()
protected abstract <T> List<T> createEnumValues(EnumContentTocEntry tocEntry,
Class<T> clazz)
protected final IProductComponent getProductComponentInternal(String kindId,
String versionId)
AbstractRuntimeRepository
getProductComponentInternal in class AbstractRuntimeRepository
public void getAllProductComponents(String kindId,
List<IProductComponent> result)
AbstractRuntimeRepository
getAllProductComponents in class AbstractRuntimeRepositorypublic void getAllProductComponents(List<IProductComponent> result)
AbstractRuntimeRepository
getAllProductComponents in class AbstractRuntimeRepositorypublic void getAllProductComponentIds(List<String> result)
AbstractRuntimeRepository
getAllProductComponentIds in class AbstractRuntimeRepositoryprotected abstract IProductComponent createProductCmpt(ProductCmptTocEntry tocEntry)
protected IProductComponentGeneration getProductComponentGenerationInternal(String id,
Calendar effectiveDate)
AbstractRuntimeRepository
getProductComponentGenerationInternal in class AbstractRuntimeRepositoryprotected IProductComponentGeneration getNextProductComponentGenerationInternal(IProductComponentGeneration generation)
getNextProductComponentGenerationInternal in class AbstractRuntimeRepositoryprotected IProductComponentGeneration getPreviousProductComponentGenerationInternal(IProductComponentGeneration generation)
getPreviousProductComponentGenerationInternal in class AbstractRuntimeRepositoryprotected IProductComponentGeneration getLatestProductComponentGenerationInternal(IProductComponent productCmpt)
getLatestProductComponentGenerationInternal in class AbstractRuntimeRepository
public void getProductComponentGenerations(IProductComponent productCmpt,
List<IProductComponentGeneration> result)
AbstractRuntimeRepository
getProductComponentGenerations in class AbstractRuntimeRepositoryprotected int getNumberOfProductComponentGenerationsInternal(IProductComponent productCmpt)
getNumberOfProductComponentGenerationsInternal in class AbstractRuntimeRepositoryprotected IProductComponentGeneration getNotCachedProductComponentGeneration(GenerationId generationId)
getNotCachedProductComponentGeneration in class AbstractCachingRuntimeRepositoryprotected abstract IProductComponentGeneration createProductCmptGeneration(GenerationTocEntry generationTocEntry)
public void getAllTables(List<ITable> result)
AbstractRuntimeRepositorygetAllTables() but searches only in this repository and not the ones,
this repository depends on. Adds the tables found to the given result list.
getAllTables in class AbstractRuntimeRepositoryprotected <T extends ITable> T getTableInternal(Class<T> tableClass)
AbstractRuntimeRepositoryAbstractRuntimeRepository.getTable(Class) but searches only in this repository and not the ones, this
repository depends on.
getTableInternal in class AbstractRuntimeRepositoryprotected ITable getNotCachedTable(String qualifiedTableName)
getNotCachedTable in class AbstractCachingRuntimeRepositoryprotected abstract ITable createTable(TableContentTocEntry tocEntry)
protected void getAllIpsTestCases(List<IpsTest2> result,
IRuntimeRepository runtimeRepository)
AbstractRuntimeRepositoryAbstractRuntimeRepository.getAllIpsTestCases(IRuntimeRepository) but searches only in this repository
and not the ones, this repository depends on. Adds the components found to the given result
list.
getAllIpsTestCases in class AbstractRuntimeRepository
protected void getIpsTestCasesStartingWith(String qNamePrefix,
List<IpsTest2> result,
IRuntimeRepository runtimeRepository)
AbstractRuntimeRepository
getIpsTestCasesStartingWith in class AbstractRuntimeRepository
protected abstract IpsTestCaseBase createTestCase(TestCaseTocEntry tocEntry,
IRuntimeRepository runtimeRepository)
protected void initialize()
protected Class<?> getClass(String className,
ClassLoader cl)
className - The qualified class namecl - The classLoader used to load the load.
RuntimeException - if the class can't be found.protected void getAllModelTypeImplementationClasses(Set<String> result)
AbstractRuntimeRepository
getAllModelTypeImplementationClasses in class AbstractRuntimeRepository
protected XmlAdapter<String,?> createEnumXmlAdapter(String className,
IRuntimeRepository repository)
throws Exception
XmlAdapter instance for the provided class name.
Exception - can occur while localizing the xml adapter class and creating the instanceprotected IProductComponent getNotCachedProductComponent(String id)
getNotCachedProductComponent in class AbstractCachingRuntimeRepositoryprotected <T> List<T> getNotCachedEnumValues(Class<T> clazz)
getNotCachedEnumValues in class AbstractCachingRuntimeRepositoryprotected List<XmlAdapter<?,?>> getNotCachedEnumXmlAdapter(IRuntimeRepository repository)
getNotCachedEnumXmlAdapter in class AbstractCachingRuntimeRepository
protected IpsTestCaseBase getIpsTestCaseInternal(String qName,
IRuntimeRepository runtimeRepository)
getIpsTestCaseInternal in class AbstractRuntimeRepository
protected <T> T getNotCachedCustomObject(Class<T> type,
String id)
getNotCachedCustomObject in class AbstractCachingRuntimeRepositoryprotected abstract <T> T createCustomObject(CustomTocEntryObject<T> tocEntry)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||