Package org.openxava.component
Class MetaComponent
java.lang.Object
org.openxava.component.MetaComponent
- All Implemented Interfaces:
Serializable
All meta info about business concept.
A business component is all software artifacts that have relation with a business concept. For example, all view, tables, classes, models, etc. about concept of Seller is the Seller business component.
- Author:
- Javier Paniza
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAggregateMapping(AggregateMapping aggregateMapping) voidaddMetaAggregate(MetaAggregate metaAggregate) voidaddMetaTab(MetaTab metaTab) voidaddMetaView(MetaView metaView) static booleanstatic MetaComponentgetAggregateMapping(String name) static Collection<MetaComponent>getAll()static Collection<MetaComponent>static SetThe names of all the root Java packages used by the components of all OpenXava application in the classpath.getMetaAggregate(String name) MetaTab by default.getMetaTab(String name) MetaTab from name.getName()Java package where the model classes resides.Package using / instead of . and it does not includes the model package.static StringgetQualifiedPackageForUnqualifiedPackage(String unqualifiedPackage) booleanhasMetaAggregate(String name) booleanbooleanbooleanisParsed()Indicates that this component has been fully parsed.booleanvoidsetEntityMapping(EntityMapping mapping) voidsetLabelForModule(boolean labelForModule) voidsetMetaDataCached(boolean metaDataCached) voidsetMetaEntity(MetaEntity metaEntity) voidvoidsetPackageName(String packageName) voidsetParsed(boolean parsed) voidsetPersistenceProvider(IPersistenceProvider persistenceProvider) voidsetTransient(boolean _transient)
-
Constructor Details
-
MetaComponent
public MetaComponent()
-
-
Method Details
-
get
- Throws:
ElementNotFoundException- If component does not exist.XavaException- Any other problem.
-
exists
- Throws:
XavaException
-
getAllLoaded
-
getName
- Returns:
- Not null and not empty string
-
setName
-
getMetaEntity
- Returns:
- Not null.
-
setMetaEntity
- Parameters:
metaEntity- Not null- Throws:
XavaException
-
addMetaView
- Parameters:
metaView- Not null.- Throws:
XavaException
-
getMetaAggregate
- Returns:
- Not null.
- Throws:
ElementNotFoundException- If the MetaAggregate does not exist in this component.XavaException- Any other problem.
-
hasMetaAggregate
-
getAggregateMapping
- Returns:
- Not null
- Throws:
ElementNotFoundException- If does not exist the aggregate mapping in this component.XavaException- Any other problem.
-
getAggregateMappings
- Throws:
XavaException
-
getMetaAggregates
- Returns:
- Elementss instanceof MetaAggregate. Not null.
- Throws:
XavaException- Any other problem.
-
getMetaAggregatesBeanGenerated
- Returns:
- Elements instanceof MetaAggregateBean and generate == true. Not null.
- Throws:
XavaException- Any other problem.
-
getMetaAggregatesForCollectionPojoGenerated
- Returns:
- Elements instanceof MetaAggregateForCollection and pojoGenerated == true. Not null.
- Throws:
XavaException- Any problem.
-
addMetaAggregate
- Parameters:
metaAggregate- Not null.
-
addAggregateMapping
- Throws:
XavaException
-
getMetaTab
MetaTab by default.- Returns:
- Not null.
- Throws:
XavaException
-
getMetaTabs
-
getMetaTab
MetaTab from name.- Parameters:
name- If null or empty string return default tab.- Returns:
- Not null
- Throws:
XavaExceptionElementNotFoundException
-
addMetaTab
- Throws:
XavaException
-
getEntityMapping
- Returns:
- Not null.
- Throws:
XavaException- Any problem, including that mapping for this component does not exist.
-
setEntityMapping
- Throws:
XavaException
-
getPackageName
Java package where the model classes resides.- Throws:
XavaException
-
setPackageName
-
getAllPackageNames
The names of all the root Java packages used by the components of all OpenXava application in the classpath.It's the root package for each application, that it returns
com.gestion400.invoicingand notcom.gestion400.invoicing.model.- Returns:
- Of
String - Throws:
XavaException
-
getQualifiedPackageForUnqualifiedPackage
public static String getQualifiedPackageForUnqualifiedPackage(String unqualifiedPackage) throws XavaException - Parameters:
unqualifiedPackage- For example, of org.openxava.test is test, that is to say, without domain (org.openxava).- Throws:
XavaException
-
getPackageNameWithSlashWithoutModel
Package using / instead of . and it does not includes the model package.- Throws:
XavaException
-
getAll
- Throws:
XavaException
-
isTransient
public boolean isTransient() -
setTransient
public void setTransient(boolean _transient) -
getPersistenceProvider
-
setPersistenceProvider
-
isMetaDataCached
public boolean isMetaDataCached() -
setMetaDataCached
public void setMetaDataCached(boolean metaDataCached) -
isParsed
public boolean isParsed()Indicates that this component has been fully parsed.Used to avoid caching partially parsed components during reentrant parses.
- Since:
- 7.7.2
-
setParsed
public void setParsed(boolean parsed) - Since:
- 7.7.2
-
isLabelForModule
public boolean isLabelForModule() -
setLabelForModule
public void setLabelForModule(boolean labelForModule)
-