Class MetaComponent

java.lang.Object
org.openxava.component.MetaComponent
All Implemented Interfaces:
Serializable

public class MetaComponent extends Object implements 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 Details

    • MetaComponent

      public MetaComponent()
  • Method Details

    • get

      public static MetaComponent get(String name) throws ElementNotFoundException
      Throws:
      ElementNotFoundException - If component does not exist.
      XavaException - Any other problem.
    • exists

      public static boolean exists(String name)
      Throws:
      XavaException
    • getAllLoaded

      public static Collection<MetaComponent> getAllLoaded()
    • getName

      public String getName()
      Returns:
      Not null and not empty string
    • setName

      public void setName(String name)
    • getMetaEntity

      public MetaEntity getMetaEntity()
      Returns:
      Not null.
    • setMetaEntity

      public void setMetaEntity(MetaEntity metaEntity)
      Parameters:
      metaEntity - Not null
      Throws:
      XavaException
    • addMetaView

      public void addMetaView(MetaView metaView)
      Parameters:
      metaView - Not null.
      Throws:
      XavaException
    • getMetaAggregate

      public MetaAggregate getMetaAggregate(String name)
      Returns:
      Not null.
      Throws:
      ElementNotFoundException - If the MetaAggregate does not exist in this component.
      XavaException - Any other problem.
    • hasMetaAggregate

      public boolean hasMetaAggregate(String name)
    • getAggregateMapping

      public AggregateMapping getAggregateMapping(String name)
      Returns:
      Not null
      Throws:
      ElementNotFoundException - If does not exist the aggregate mapping in this component.
      XavaException - Any other problem.
    • getAggregateMappings

      public Collection getAggregateMappings()
      Throws:
      XavaException
    • getMetaAggregates

      public Collection getMetaAggregates()
      Returns:
      Elementss instanceof MetaAggregate. Not null.
      Throws:
      XavaException - Any other problem.
    • getMetaAggregatesBeanGenerated

      public Collection getMetaAggregatesBeanGenerated()
      Returns:
      Elements instanceof MetaAggregateBean and generate == true. Not null.
      Throws:
      XavaException - Any other problem.
    • getMetaAggregatesForCollectionPojoGenerated

      public Collection getMetaAggregatesForCollectionPojoGenerated()
      Returns:
      Elements instanceof MetaAggregateForCollection and pojoGenerated == true. Not null.
      Throws:
      XavaException - Any problem.
    • addMetaAggregate

      public void addMetaAggregate(MetaAggregate metaAggregate)
      Parameters:
      metaAggregate - Not null.
    • addAggregateMapping

      public void addAggregateMapping(AggregateMapping aggregateMapping)
      Throws:
      XavaException
    • getMetaTab

      public MetaTab getMetaTab()
      MetaTab by default.
      Returns:
      Not null.
      Throws:
      XavaException
    • getMetaTabs

      public Collection getMetaTabs()
    • getMetaTab

      public MetaTab getMetaTab(String name) throws ElementNotFoundException
      MetaTab from name.
      Parameters:
      name - If null or empty string return default tab.
      Returns:
      Not null
      Throws:
      XavaException
      ElementNotFoundException
    • addMetaTab

      public void addMetaTab(MetaTab metaTab)
      Throws:
      XavaException
    • getEntityMapping

      public EntityMapping getEntityMapping()
      Returns:
      Not null.
      Throws:
      XavaException - Any problem, including that mapping for this component does not exist.
    • setEntityMapping

      public void setEntityMapping(EntityMapping mapping)
      Throws:
      XavaException
    • getPackageName

      public String getPackageName()
      Java package where the model classes resides.
      Throws:
      XavaException
    • setPackageName

      public void setPackageName(String packageName)
    • getAllPackageNames

      public static Set 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.invoicing and not com.gestion400.invoicing.model.

      Returns:
      Of String
      Throws:
      XavaException
    • getQualifiedPackageForUnqualifiedPackage

      public static String getQualifiedPackageForUnqualifiedPackage(String unqualifiedPackage)
      Parameters:
      unqualifiedPackage - For example, of org.openxava.test is test, that is to say, without domain (org.openxava).
      Throws:
      XavaException
    • getPackageNameWithSlashWithoutModel

      public String getPackageNameWithSlashWithoutModel()
      Package using / instead of . and it does not includes the model package.
      Throws:
      XavaException
    • getAll

      public static Collection<MetaComponent> getAll()
      Throws:
      XavaException
    • isTransient

      public boolean isTransient()
    • setTransient

      public void setTransient(boolean _transient)
    • getPersistenceProvider

      public IPersistenceProvider getPersistenceProvider()
    • setPersistenceProvider

      public void setPersistenceProvider(IPersistenceProvider persistenceProvider)
    • 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)