C# 클래스 Habanero.BO.BOProp

Stores the values (current Value, DatabaseValue etc) and state (dirty, valid) of a property of a IBusinessObject. Has a reference to the Property Definition PropDef that was used to create it. The Property definition includes property rules and validation functionality. The property of a business object may represent a property such as FirstName, Surname. Typically a IBusinessObject will have a collection of Properties.
상속: IBOProp
파일 보기 프로젝트 열기: Chillisoft/habanero 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_currentValue object
_invalidReason string
_isDirty bool
_isObjectNew bool
_isValid bool
_logger IHabaneroLogger
_origInvalidReason string
_origValueIsValid bool
_persistedValue object
_propDef IPropDef
_valueBeforeLastEdit object

공개 메소드들

메소드 설명
BOProp ( IPropDef propDef ) : System

Constructor to initialise a new property

BOProp ( IPropDef propDef, object propValue ) : System

Constructor to initialise a new property with a specific value

BackupPropValue ( ) : void

Copies the current property value to PersistedValue. This is usually called when the object is persisted to the database.

CurrentValueEquals ( object value ) : bool

Is the value equal to the current Value of the BOProp.

InitialiseProp ( object propValue ) : bool

Initialises the property with the specified value

IsEditable ( string &message ) : bool

Returns whether the BOProperty is Editable or not. The BOProp may not be editable based on a number of factors. 1) If its ReadWrite Rules are set to ReadOnly etc. 2) The user may not have permissions to edit this property Value.

IsReadable ( string &message ) : bool

Returns whether the BOProperty is Readable or not. The BOProp may not be Readable if the user may not have permissions to read the property Value.

ParsePropValue ( object valueToParse, object &returnValue ) : void

This method provides a the functionality to convert any object to the appropriate type for the particular BOProp Type. e.g it will convert a valid guid string to a valid Guid Object.

RestorePropValue ( ) : void

Restores the property's original value as defined in PersistedValue

SetAuthorisationRules ( IBOPropAuthorisation boPropAuthorisation ) : void

Set the authorisation rule strategy to be used

Validate ( ) : void

Validates whether the property values set for the BOProp are valid as compared to the BOProp rules. This is used by the Business Object Validate Method.

보호된 메소드들

메소드 설명
FireBOPropValueUpdated ( ) : void

Fires an Updated event

InitialiseProp ( object propValue, bool isObjectNew ) : bool

Initialises the property with the specified value, and indicates whether the object is new or not

IsReadable ( ) : bool

Are there any authorisation rules preventing this property from being read.

RaiseIncorrectTypeException ( object value ) : void

Raises an Erorr if the Incorrect type of property is being set to this BOProp.

비공개 메소드들

메소드 설명
AreReadWriteRulesEditable ( string &message ) : bool
CompareValues ( object compareToValue, object value ) : bool
FormatForXML ( string text ) : string
PersistedValueEquals ( object value ) : bool

Is the value equal to the persisted Value of the BOProp.

메소드 상세

BOProp() 공개 메소드

Constructor to initialise a new property
public BOProp ( IPropDef propDef ) : System
propDef IPropDef The property definition
리턴 System

BOProp() 공개 메소드

Constructor to initialise a new property with a specific value
public BOProp ( IPropDef propDef, object propValue ) : System
propDef IPropDef The property definition
propValue object The initial value
리턴 System

BackupPropValue() 공개 메소드

Copies the current property value to PersistedValue. This is usually called when the object is persisted to the database.
public BackupPropValue ( ) : void
리턴 void

CurrentValueEquals() 공개 메소드

Is the value equal to the current Value of the BOProp.
public CurrentValueEquals ( object value ) : bool
value object
리턴 bool

FireBOPropValueUpdated() 보호된 메소드

Fires an Updated event
protected FireBOPropValueUpdated ( ) : void
리턴 void

InitialiseProp() 공개 메소드

Initialises the property with the specified value
public InitialiseProp ( object propValue ) : bool
propValue object The value to assign
리턴 bool

InitialiseProp() 보호된 메소드

Initialises the property with the specified value, and indicates whether the object is new or not
protected InitialiseProp ( object propValue, bool isObjectNew ) : bool
propValue object The value to assign
isObjectNew bool Whether the object is new or not
리턴 bool

IsEditable() 공개 메소드

Returns whether the BOProperty is Editable or not. The BOProp may not be editable based on a number of factors. 1) If its ReadWrite Rules are set to ReadOnly etc. 2) The user may not have permissions to edit this property Value.
public IsEditable ( string &message ) : bool
message string
리턴 bool

IsReadable() 보호된 메소드

Are there any authorisation rules preventing this property from being read.
protected IsReadable ( ) : bool
리턴 bool

IsReadable() 공개 메소드

Returns whether the BOProperty is Readable or not. The BOProp may not be Readable if the user may not have permissions to read the property Value.
public IsReadable ( string &message ) : bool
message string the reason why the user cannot read the property.
리턴 bool

ParsePropValue() 공개 메소드

This method provides a the functionality to convert any object to the appropriate type for the particular BOProp Type. e.g it will convert a valid guid string to a valid Guid Object.
public ParsePropValue ( object valueToParse, object &returnValue ) : void
valueToParse object The value to be converted
returnValue object The value that has been parsed
리턴 void

RaiseIncorrectTypeException() 보호된 메소드

Raises an Erorr if the Incorrect type of property is being set to this BOProp.
protected RaiseIncorrectTypeException ( object value ) : void
value object
리턴 void

RestorePropValue() 공개 메소드

Restores the property's original value as defined in PersistedValue
public RestorePropValue ( ) : void
리턴 void

SetAuthorisationRules() 공개 메소드

Set the authorisation rule strategy to be used
public SetAuthorisationRules ( IBOPropAuthorisation boPropAuthorisation ) : void
boPropAuthorisation IBOPropAuthorisation
리턴 void

Validate() 공개 메소드

Validates whether the property values set for the BOProp are valid as compared to the BOProp rules. This is used by the Business Object Validate Method.
public Validate ( ) : void
리턴 void

프로퍼티 상세

_currentValue 보호되어 있는 프로퍼티

The current value of the BOProp
protected object _currentValue
리턴 object

_invalidReason 보호되어 있는 프로퍼티

The reason the prop is invalid
protected string _invalidReason
리턴 string

_isDirty 보호되어 있는 프로퍼티

Whether the prop has been edited since being created or loaded from the database
protected bool _isDirty
리턴 bool

_isObjectNew 보호되어 있는 프로퍼티

Is the business object new.
protected bool _isObjectNew
리턴 bool

_isValid 보호되어 있는 프로퍼티

Is the boProp valid
protected bool _isValid
리턴 bool

_logger 보호되어 있는 정적으로 프로퍼티

The Logger
protected static IHabaneroLogger _logger
리턴 IHabaneroLogger

_origInvalidReason 보호되어 있는 프로퍼티

The reason that the origional value was not valid.
protected string _origInvalidReason
리턴 string

_origValueIsValid 보호되어 있는 프로퍼티

Whether the origional value loaded from the DB or the default value was valid.
protected bool _origValueIsValid
리턴 bool

_persistedValue 보호되어 있는 프로퍼티

The persisted value of the Property.
protected object _persistedValue
리턴 object

_propDef 보호되어 있는 프로퍼티

The propDef for the BOProp
protected IPropDef _propDef
리턴 IPropDef

_valueBeforeLastEdit 보호되어 있는 프로퍼티

The value prior to the last edit.
protected object _valueBeforeLastEdit
리턴 object