C# Class BExIS.Dlm.Services.MetadataStructure.MetadataAttributeManager

Mostra file Open project: BEXIS2/Core Class Usage Examples

Public Methods

Method Description
AddAggregateFunction ( DataContainer container, AggregateFunction aggregateFunction ) : DataAttribute
AddConstraint ( ComparisonConstraint constraint, DataContainer container ) : void
AddConstraint ( DomainConstraint constraint, DataContainer container ) : void
AddConstraint ( PatternConstraint constraint, DataContainer container ) : void
AddConstraint ( RangeConstraint constraint, DataContainer container ) : void
AddExtendedProperty ( DataContainer container, ExtendedProperty extendedProperty ) : DataAttribute
AddGlobalizationInfo ( DataContainer container, GlobalizationInfo globalizationInfo ) : DataAttribute
Create ( MetadataCompoundAttribute entity ) : MetadataCompoundAttribute

Persists a compound metadata attribute in the database

The attribute should have at least two other attributes as its member to be considered a compound! Also it should have at least a non empty short name.

Create ( MetadataSimpleAttribute entity ) : MetadataSimpleAttribute

Persists a simple metadata attribute is the database.

The method does not check duplicate names.

Create ( string shortName, string name, string description, bool isMultiValue, bool isBuiltIn, string scope, MeasurementScale measurementScale, DataContainerType containerType, string entitySelectionPredicate, DataType dataType, Unit unit, Methodology methodology, ICollection functions, ICollection globalizationInfos, ICollection constraints ) : MetadataSimpleAttribute

Creates a simple metadata attribute and persists it in the database

Delete ( IEnumerable entities ) : bool

Tries to delete all the attributes provided in the entities, supposed that they are all persisted and non built-in attributes.

If by deleting the any of the entities any other compound attribute will have less than 2 members, the deletion fails.

Delete ( MetadataAttribute entity ) : bool

Deletes the saved entity from the database. The entity should not be a built-in one.

If by deleting the entity any other compound attribute will have less than 2 members, the deletion fails.

MetadataAttributeManager ( ) : System
RemoveAggregateFunction ( DataContainer container, AggregateFunction aggregateFunction ) : DataAttribute
RemoveConstraint ( ComparisonConstraint constraint ) : void
RemoveConstraint ( DomainConstraint constraint ) : void
RemoveConstraint ( PatternConstraint constraint ) : void
RemoveConstraint ( RangeConstraint constraint ) : void
RemoveExtendedProperty ( ExtendedProperty extendedProperty ) : DataAttribute
RemoveGlobalizationInfo ( GlobalizationInfo globalizationInfo ) : DataAttribute
Update ( MetadataAttribute entity ) : MetadataAttribute

Method Details

AddAggregateFunction() public method

public AddAggregateFunction ( DataContainer container, AggregateFunction aggregateFunction ) : DataAttribute
container DataContainer
aggregateFunction AggregateFunction
return BExIS.Dlm.Entities.DataStructure.DataAttribute

AddConstraint() public method

public AddConstraint ( ComparisonConstraint constraint, DataContainer container ) : void
constraint ComparisonConstraint
container DataContainer
return void

AddConstraint() public method

public AddConstraint ( DomainConstraint constraint, DataContainer container ) : void
constraint DomainConstraint
container DataContainer
return void

AddConstraint() public method

public AddConstraint ( PatternConstraint constraint, DataContainer container ) : void
constraint PatternConstraint
container DataContainer
return void

AddConstraint() public method

public AddConstraint ( RangeConstraint constraint, DataContainer container ) : void
constraint RangeConstraint
container DataContainer
return void

AddExtendedProperty() public method

public AddExtendedProperty ( DataContainer container, ExtendedProperty extendedProperty ) : DataAttribute
container DataContainer
extendedProperty BExIS.Dlm.Entities.DataStructure.ExtendedProperty
return BExIS.Dlm.Entities.DataStructure.DataAttribute

AddGlobalizationInfo() public method

public AddGlobalizationInfo ( DataContainer container, GlobalizationInfo globalizationInfo ) : DataAttribute
container DataContainer
globalizationInfo BExIS.Dlm.Entities.DataStructure.GlobalizationInfo
return BExIS.Dlm.Entities.DataStructure.DataAttribute

Create() public method

Persists a compound metadata attribute in the database
The attribute should have at least two other attributes as its member to be considered a compound! Also it should have at least a non empty short name.
public Create ( MetadataCompoundAttribute entity ) : MetadataCompoundAttribute
entity BExIS.Dlm.Entities.MetadataStructure.MetadataCompoundAttribute is an unsaved compound metadata data attribute
return BExIS.Dlm.Entities.MetadataStructure.MetadataCompoundAttribute

Create() public method

Persists a simple metadata attribute is the database.
The method does not check duplicate names.
public Create ( MetadataSimpleAttribute entity ) : MetadataSimpleAttribute
entity BExIS.Dlm.Entities.MetadataStructure.MetadataSimpleAttribute is an unsaved simple metadata attribute.
return BExIS.Dlm.Entities.MetadataStructure.MetadataSimpleAttribute

Create() public method

Creates a simple metadata attribute and persists it in the database
public Create ( string shortName, string name, string description, bool isMultiValue, bool isBuiltIn, string scope, MeasurementScale measurementScale, DataContainerType containerType, string entitySelectionPredicate, DataType dataType, Unit unit, Methodology methodology, ICollection functions, ICollection globalizationInfos, ICollection constraints ) : MetadataSimpleAttribute
shortName string
name string
description string
isMultiValue bool Indicates whether the attribute accepts multiple values.
isBuiltIn bool If yes, the attribute is created by the system itself and is not delete-able
scope string Creates a context of ownership for the attribute so that the modules, or different parts of the system can use it i.e. for filtering.
measurementScale MeasurementScale
containerType DataContainerType
entitySelectionPredicate string
dataType BExIS.Dlm.Entities.DataStructure.DataType
unit BExIS.Dlm.Entities.DataStructure.Unit
methodology BExIS.Dlm.Entities.DataStructure.Methodology
functions ICollection
globalizationInfos ICollection
constraints ICollection
return BExIS.Dlm.Entities.MetadataStructure.MetadataSimpleAttribute

Delete() public method

Tries to delete all the attributes provided in the entities, supposed that they are all persisted and non built-in attributes.
If by deleting the any of the entities any other compound attribute will have less than 2 members, the deletion fails.
public Delete ( IEnumerable entities ) : bool
entities IEnumerable
return bool

Delete() public method

Deletes the saved entity from the database. The entity should not be a built-in one.
If by deleting the entity any other compound attribute will have less than 2 members, the deletion fails.
public Delete ( MetadataAttribute entity ) : bool
entity BExIS.Dlm.Entities.MetadataStructure.MetadataAttribute
return bool

MetadataAttributeManager() public method

public MetadataAttributeManager ( ) : System
return System

RemoveAggregateFunction() public method

public RemoveAggregateFunction ( DataContainer container, AggregateFunction aggregateFunction ) : DataAttribute
container DataContainer
aggregateFunction AggregateFunction
return BExIS.Dlm.Entities.DataStructure.DataAttribute

RemoveConstraint() public method

public RemoveConstraint ( ComparisonConstraint constraint ) : void
constraint ComparisonConstraint
return void

RemoveConstraint() public method

public RemoveConstraint ( DomainConstraint constraint ) : void
constraint DomainConstraint
return void

RemoveConstraint() public method

public RemoveConstraint ( PatternConstraint constraint ) : void
constraint PatternConstraint
return void

RemoveConstraint() public method

public RemoveConstraint ( RangeConstraint constraint ) : void
constraint RangeConstraint
return void

RemoveExtendedProperty() public method

public RemoveExtendedProperty ( ExtendedProperty extendedProperty ) : DataAttribute
extendedProperty BExIS.Dlm.Entities.DataStructure.ExtendedProperty
return BExIS.Dlm.Entities.DataStructure.DataAttribute

RemoveGlobalizationInfo() public method

public RemoveGlobalizationInfo ( GlobalizationInfo globalizationInfo ) : DataAttribute
globalizationInfo BExIS.Dlm.Entities.DataStructure.GlobalizationInfo
return BExIS.Dlm.Entities.DataStructure.DataAttribute

Update() public method

public Update ( MetadataAttribute entity ) : MetadataAttribute
entity BExIS.Dlm.Entities.MetadataStructure.MetadataAttribute
return BExIS.Dlm.Entities.MetadataStructure.MetadataAttribute