|
||||||||||
| 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.InMemoryRuntimeRepository
public class InMemoryRuntimeRepository
A runtime repository that keeps it's data in memory.
| Constructor Summary | |
|---|---|
InMemoryRuntimeRepository()
|
|
InMemoryRuntimeRepository(String name)
|
|
| Method Summary | ||
|---|---|---|
void |
addEnumXmlAdapter(XmlAdapter<?,?> enumXmlAdapter)
Adds an XmlAdapter for a Faktor-IPS enumeration that defers its content to a
enumeration content to this repository. |
|
protected List<XmlAdapter<?,?>> |
getAllInternalEnumXmlAdapters(IRuntimeRepository repository)
Returns all enumeration XmlAdapters available in this repository that generated by Faktor-IPS. |
|
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. |
|
protected void |
getAllTables(List<ITable> result)
Same as getAllTables() but searches only in this repository and not the ones,
this repository depends on. |
|
protected
|
getCustomRuntimeObjectInternal(Class<T> type,
String id)
Same as getCustomRuntimeObject(Class |
|
protected
|
getEnumValuesInternal(Class<T> clazz)
Returns the list of enumeration values of the enumeration type that is identified by its class which is provided to it. |
|
protected IpsTestCaseBase |
getIpsTestCaseInternal(String qName,
IRuntimeRepository runtimeRepository)
Same as AbstractRuntimeRepository.getIpsTestCase(String, IRuntimeRepository) but searches only in this
repository and not the ones, this repository depends on. |
|
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 int |
getNumberOfProductComponentGenerationsInternal(IProductComponent productCmpt)
|
|
protected IProductComponentGeneration |
getPreviousProductComponentGenerationInternal(IProductComponentGeneration generation)
|
|
protected IProductComponentGeneration |
getProductComponentGenerationInternal(String productCmptId,
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 id)
Same as getProductComponent(String id) 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)
InMemoryRepository also searches for tables that are instances of subclasses of the given tableClass. |
|
protected ITable |
getTableInternal(String qualifiedTableName)
Same as AbstractRuntimeRepository.getTable(String)) but searches only in this repository and not the ones,
this repository depends on. |
|
void |
initialize()
Nothing to do for the in memory repository. |
|
boolean |
isModifiable()
Returns true if the repository's content is modifiable. |
|
|
putCustomRuntimeObject(Class<T> type,
String ipsObjectQualifiedName,
T runtimeObject)
Puts the runtimeObject into the repository. |
|
|
putEnumValues(Class<T> enumType,
List<T> enumValues)
Puts the given enum values in the repository replacing all existing values for the given enumType. |
|
void |
putIpsTestCase(IpsTestCaseBase test)
Puts the test case into the repository. |
|
void |
putProductCmptGeneration(IProductComponentGeneration generation)
Puts the product component generation and it's product componet into the repository. |
|
void |
putProductComponent(IProductComponent productCmpt)
Puts the product component into the repository. |
|
void |
putTable(ITable table)
Puts the table into the repository. |
|
void |
putTable(ITable table,
String qName)
Puts the table with the indicated name into the repository with . |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InMemoryRuntimeRepository()
public InMemoryRuntimeRepository(String name)
| Method Detail |
|---|
protected IProductComponent getProductComponentInternal(String id)
AbstractRuntimeRepository
getProductComponentInternal in class AbstractRuntimeRepository
protected IProductComponent getProductComponentInternal(String kindId,
String versionId)
AbstractRuntimeRepository
getProductComponentInternal in class AbstractRuntimeRepository
public void getAllProductComponents(String kindId,
List<IProductComponent> result)
AbstractRuntimeRepository
getAllProductComponents in class AbstractRuntimeRepository
public void getProductComponentGenerations(IProductComponent productCmpt,
List<IProductComponentGeneration> result)
AbstractRuntimeRepository
getProductComponentGenerations in class AbstractRuntimeRepositorypublic void initialize()
protected 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)
Same as AbstractRuntimeRepository.getTable(Class) but searches only in this repository and not the ones, this
repository depends on.
getTableInternal in class AbstractRuntimeRepositorypublic void putTable(ITable table)
NullPointerException - if table is null.
public void putTable(ITable table,
String qName)
NullPointerException - if table or qName is null.
public <T> void putEnumValues(Class<T> enumType,
List<T> enumValues)
enumType - The Java class representing the enumeration type.enumValues - The value of the enumeration type as list.protected ITable getTableInternal(String qualifiedTableName)
AbstractRuntimeRepositoryAbstractRuntimeRepository.getTable(String)) but searches only in this repository and not the ones,
this repository depends on.
getTableInternal in class AbstractRuntimeRepositorypublic void getAllProductComponents(List<IProductComponent> result)
AbstractRuntimeRepository
getAllProductComponents in class AbstractRuntimeRepositorypublic void getAllProductComponentIds(List<String> result)
AbstractRuntimeRepository
getAllProductComponentIds in class AbstractRuntimeRepositorypublic boolean isModifiable()
IRuntimeRepositorytrue if the repository's content is modifiable. This feature is mainly
targeted for writing test cases that need to setup a repository with a test specific content
programatically. Returns false otherwise.
public void putProductComponent(IProductComponent productCmpt)
IllegalRepositoryModificationException - if this repository does not allows to modify
NullPointerException - if cmpt is null it's contents.IRuntimeRepository.isModifiable()
protected IProductComponentGeneration getProductComponentGenerationInternal(String productCmptId,
Calendar effectiveDate)
AbstractRuntimeRepository
getProductComponentGenerationInternal in class AbstractRuntimeRepositorypublic void putProductCmptGeneration(IProductComponentGeneration generation)
IllegalRepositoryModificationException - if this repository does not allows to modify
it's contents.
NullPointerException - if generation is nullIRuntimeRepository.isModifiable()
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 IpsTestCaseBase getIpsTestCaseInternal(String qName,
IRuntimeRepository runtimeRepository)
AbstractRuntimeRepositoryAbstractRuntimeRepository.getIpsTestCase(String, IRuntimeRepository) but searches only in this
repository and not the ones, this repository depends on. The given runtimeRepository
specifies the repository which will be used to instantiate the test case (e.g. the first
repository which contains all dependence repositories).
getIpsTestCaseInternal in class AbstractRuntimeRepositorypublic void putIpsTestCase(IpsTestCaseBase test)
protected void getAllModelTypeImplementationClasses(Set<String> result)
AbstractRuntimeRepository
getAllModelTypeImplementationClasses in class AbstractRuntimeRepositoryprotected IProductComponentGeneration getNextProductComponentGenerationInternal(IProductComponentGeneration generation)
getNextProductComponentGenerationInternal in class AbstractRuntimeRepositoryprotected int getNumberOfProductComponentGenerationsInternal(IProductComponent productCmpt)
getNumberOfProductComponentGenerationsInternal in class AbstractRuntimeRepositoryprotected IProductComponentGeneration getPreviousProductComponentGenerationInternal(IProductComponentGeneration generation)
getPreviousProductComponentGenerationInternal in class AbstractRuntimeRepositoryprotected IProductComponentGeneration getLatestProductComponentGenerationInternal(IProductComponent productCmpt)
getLatestProductComponentGenerationInternal in class AbstractRuntimeRepositoryprotected <T> List<T> getEnumValuesInternal(Class<T> clazz)
AbstractRuntimeRepository
getEnumValuesInternal in class AbstractRuntimeRepositorypublic void addEnumXmlAdapter(XmlAdapter<?,?> enumXmlAdapter)
XmlAdapter for a Faktor-IPS enumeration that defers its content to a
enumeration content to this repository.
protected List<XmlAdapter<?,?>> getAllInternalEnumXmlAdapters(IRuntimeRepository repository)
AbstractRuntimeRepository
getAllInternalEnumXmlAdapters in class AbstractRuntimeRepositoryrepository - the runtime repository that needs to be used by the XmlAdapters that are
returned by this method
public <T extends IRuntimeObject> void putCustomRuntimeObject(Class<T> type,
String ipsObjectQualifiedName,
T runtimeObject)
protected <T> T getCustomRuntimeObjectInternal(Class<T> type,
String id)
AbstractRuntimeRepository
getCustomRuntimeObjectInternal in class AbstractRuntimeRepository
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||