View source | Discuss this page | Page history | Printable version   

ERP 2.50:Developers Guide/Reference/Entity Model/ModuleDependency

ModuleDependency

This table defines the dependencies among modules, in case the module is a template the dependencies defined in this table will be used to calculate the modules included in the template.

To the database table (AD_Module_Dependency) of this entity.

Back to the entity model.

Properties

Note:

Property Column Constraints Type Description
id* AD_Module_Dependency_ID Mandatory
Max Length: 32
java.lang.String Defines dependencies ammong modules
client AD_Client_ID Mandatory ADClient A Client is a company or a legal entity. You cannot share data between Clients.
organization AD_Org_ID Mandatory Organization An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.
active IsActive Mandatory java.lang.Boolean There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records:

(1) The system requires the record for auditing purposes. (2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions.

creationDate Created Mandatory java.util.Date The Created field indicates the date that this record was created.
createdBy CreatedBy Mandatory ADUser The Created By field indicates the user who created this record.
updated Updated Mandatory java.util.Date The Updated field indicates the date that this record was updated.
updatedBy Updatedby Mandatory ADUser The Updated By field indicates the user who updated this record.
module# AD_Module_ID Mandatory ADModule Indicates the module the element forms part of.
dependentModule# AD_Dependent_Module_ID Mandatory ADModule It is the Dependent Module for the current dependency.
firstVersion# StartVersion Mandatory
Max Length: 10
java.lang.String It is the first compatible version for the dependency, in case last version is blank is will be the only one.
lastVersion EndVersion Max Length: 10 java.lang.String It is the last compatible version to define the dependency.
isIncluded IsIncluded Mandatory java.lang.Boolean A dependency can include other modules in case it is a dependency for packages.
dependantModuleName Dependant_Module_Name Max Length: 60 java.lang.String The name of the dependent module is stored here because the dependent module can have been removed. In that case it is still relevant to show the module name to detect a broken dependency.
dependencyEnforcement Dependency_Enforcement Mandatory
Max Length: 60
java.lang.String Dependency enforcement defines which are the versions of the dependent module that are compatible with the parent one.

The values it can contain are:

  • Major Version (default). The compatible versions are all the minor version within the same major version. If "Last Version" is defined being a different major version than "From Version", "Last Version" defines the highest compatible minor version; if "Last Version" is in the same major version than "From Version" this value is not taken into account. It is the default value.
  • Minor Version. Defines a strict dependency to the exact minor version. In case no "Last Version" is set, "From Version" is the only compatible version. Other case the compatible versions are all between "From" and "Last Version" values.
  • None. "From Version" is the only field taken into account, there is no restriction on different major versions.
userEditableEnforcement User_Editable_Enforcement Mandatory java.lang.Boolean When a dependency/inclusion is "User Editable Enforcement", the enforcement defined for that dependency can be overwritten at instance level.
instanceEnforcement Instance_Enforcement Max Length: 60 java.lang.String In case the dependency is set as "User Editable", this value overwrites the Instance Enforcement one.

Java Entity Class

 
/*
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
 * All portions are Copyright (C) 2008-2010 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************
*/
package org.openbravo.model.ad.module;
 
import org.openbravo.base.structure.ActiveEnabled;
import org.openbravo.base.structure.BaseOBObject;
import org.openbravo.base.structure.ClientEnabled;
import org.openbravo.base.structure.OrganizationEnabled;
import org.openbravo.base.structure.Traceable;
import org.openbravo.model.ad.access.User;
import org.openbravo.model.ad.system.Client;
import org.openbravo.model.common.enterprise.Organization;
 
import java.lang.Boolean;
import java.lang.String;
 
import java.util.Date;
 
/**
 * Entity class for entity ModuleDependency (stored in table AD_Module_Dependency).
 *
 * NOTE: This class should not be instantiated directly. To instantiate this
 * class the {@link org.openbravo.base.provider.OBProvider} should be used.
 */
public class ModuleDependency extends BaseOBObject implements Traceable,
    ClientEnabled, OrganizationEnabled, ActiveEnabled {
    private static final long serialVersionUID = 1L;
    public static final String TABLE_NAME = "AD_Module_Dependency";
    public static final String ModuleDependency = "ModuleDependency";
    public static final String PROPERTY_ID = "id";
    public static final String PROPERTY_CLIENT = "client";
    public static final String PROPERTY_ORGANIZATION = "organization";
    public static final String PROPERTY_ACTIVE = "active";
    public static final String PROPERTY_CREATIONDATE = "creationDate";
    public static final String PROPERTY_CREATEDBY = "createdBy";
    public static final String PROPERTY_UPDATED = "updated";
    public static final String PROPERTY_UPDATEDBY = "updatedBy";
    public static final String PROPERTY_MODULE = "module";
    public static final String PROPERTY_DEPENDENTMODULE = "dependentModule";
    public static final String PROPERTY_FIRSTVERSION = "firstVersion";
    public static final String PROPERTY_LASTVERSION = "lastVersion";
    public static final String PROPERTY_ISINCLUDED = "isIncluded";
    public static final String PROPERTY_DEPENDANTMODULENAME =
        "dependantModuleName";
    public static final String PROPERTY_DEPENDENCYENFORCEMENT =
        "dependencyEnforcement";
    public static final String PROPERTY_USEREDITABLEENFORCEMENT =
        "userEditableEnforcement";
    public static final String PROPERTY_INSTANCEENFORCEMENT =
        "instanceEnforcement";
 
    public ModuleDependency() {
        setDefaultValue(PROPERTY_ACTIVE, true);
        setDefaultValue(PROPERTY_CREATIONDATE, new Date());
        setDefaultValue(PROPERTY_UPDATED, new Date());
        setDefaultValue(PROPERTY_DEPENDENCYENFORCEMENT, "MAJOR");
        setDefaultValue(PROPERTY_USEREDITABLEENFORCEMENT, false);
    }
 
    @Override
    public String getEntityName() {
        return ModuleDependency;
    }
 
    public String getId() {
        return (String) get(PROPERTY_ID);
    }
 
    public void setId(String id) {
        set(PROPERTY_ID, id);
    }
 
    public Client getClient() {
        return (Client) get(PROPERTY_CLIENT);
    }
 
    public void setClient(Client client) {
        set(PROPERTY_CLIENT, client);
    }
 
    public Organization getOrganization() {
        return (Organization) get(PROPERTY_ORGANIZATION);
    }
 
    public void setOrganization(Organization organization) {
        set(PROPERTY_ORGANIZATION, organization);
    }
 
    public Boolean isActive() {
        return (Boolean) get(PROPERTY_ACTIVE);
    }
 
    public void setActive(Boolean active) {
        set(PROPERTY_ACTIVE, active);
    }
 
    public Date getCreationDate() {
        return (Date) get(PROPERTY_CREATIONDATE);
    }
 
    public void setCreationDate(Date creationDate) {
        set(PROPERTY_CREATIONDATE, creationDate);
    }
 
    public User getCreatedBy() {
        return (User) get(PROPERTY_CREATEDBY);
    }
 
    public void setCreatedBy(User createdBy) {
        set(PROPERTY_CREATEDBY, createdBy);
    }
 
    public Date getUpdated() {
        return (Date) get(PROPERTY_UPDATED);
    }
 
    public void setUpdated(Date updated) {
        set(PROPERTY_UPDATED, updated);
    }
 
    public User getUpdatedBy() {
        return (User) get(PROPERTY_UPDATEDBY);
    }
 
    public void setUpdatedBy(User updatedBy) {
        set(PROPERTY_UPDATEDBY, updatedBy);
    }
 
    public Module getModule() {
        return (Module) get(PROPERTY_MODULE);
    }
 
    public void setModule(Module module) {
        set(PROPERTY_MODULE, module);
    }
 
    public Module getDependentModule() {
        return (Module) get(PROPERTY_DEPENDENTMODULE);
    }
 
    public void setDependentModule(Module dependentModule) {
        set(PROPERTY_DEPENDENTMODULE, dependentModule);
    }
 
    public String getFirstVersion() {
        return (String) get(PROPERTY_FIRSTVERSION);
    }
 
    public void setFirstVersion(String firstVersion) {
        set(PROPERTY_FIRSTVERSION, firstVersion);
    }
 
    public String getLastVersion() {
        return (String) get(PROPERTY_LASTVERSION);
    }
 
    public void setLastVersion(String lastVersion) {
        set(PROPERTY_LASTVERSION, lastVersion);
    }
 
    public Boolean isIncluded() {
        return (Boolean) get(PROPERTY_ISINCLUDED);
    }
 
    public void setIncluded(Boolean isIncluded) {
        set(PROPERTY_ISINCLUDED, isIncluded);
    }
 
    public String getDependantModuleName() {
        return (String) get(PROPERTY_DEPENDANTMODULENAME);
    }
 
    public void setDependantModuleName(String dependantModuleName) {
        set(PROPERTY_DEPENDANTMODULENAME, dependantModuleName);
    }
 
    public String getDependencyEnforcement() {
        return (String) get(PROPERTY_DEPENDENCYENFORCEMENT);
    }
 
    public void setDependencyEnforcement(String dependencyEnforcement) {
        set(PROPERTY_DEPENDENCYENFORCEMENT, dependencyEnforcement);
    }
 
    public Boolean isUserEditableEnforcement() {
        return (Boolean) get(PROPERTY_USEREDITABLEENFORCEMENT);
    }
 
    public void setUserEditableEnforcement(Boolean userEditableEnforcement) {
        set(PROPERTY_USEREDITABLEENFORCEMENT, userEditableEnforcement);
    }
 
    public String getInstanceEnforcement() {
        return (String) get(PROPERTY_INSTANCEENFORCEMENT);
    }
 
    public void setInstanceEnforcement(String instanceEnforcement) {
        set(PROPERTY_INSTANCEENFORCEMENT, instanceEnforcement);
    }
}

Retrieved from "http://wiki.openbravo.com/wiki/ERP_2.50:Developers_Guide/Reference/Entity_Model/ModuleDependency"

This page has been accessed 1,326 times. This page was last modified on 14 June 2011, at 11:04. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.