Class GenericVO
- Namespace
- PHCDataLayer
- Assembly
- PHCDataLayer.dll
[Serializable]
public class GenericVO : ChangeVO, IBaseSerialization, ICloneVO, ICloneable, IChange, IParent, IGenericVO
- Inheritance
-
GenericVO
Constructors
GenericVO()
Fields
_connectionString
protected string _connectionString
Field Value
- string
Properties
ByTrigger
public bool ByTrigger { get; set; }
Property Value
- bool
ConnectionString
public string ConnectionString { get; set; }
Property Value
- string
FlagsCollection
public List<TableFlags> FlagsCollection { get; }
Property Value
- List<TableFlags>
GetFieldStampName
public virtual string GetFieldStampName { get; }
Property Value
- string
GetStampValue
public virtual string GetStampValue { get; }
Property Value
- string
IsChanged
Se o VO ou alguma das suas colecções se modificaram, quer seja Ins, Upd ou Del
public override bool IsChanged { get; }
Property Value
- bool
IsDummy
public bool IsDummy { get; set; }
Property Value
- bool
IsLazyLoadingActive
public bool IsLazyLoadingActive { get; set; }
Property Value
- bool
IsParcialLoad
[AttHidden]
public bool IsParcialLoad { get; set; }
Property Value
- bool
IsPrinting
public bool IsPrinting { get; set; }
Property Value
- bool
LabelFieldValue
[AttHidden]
public string LabelFieldValue { get; }
Property Value
- string
StructureInstance
public VOStructure StructureInstance { get; set; }
Property Value
- VOStructure
TableTarget
public DBTarget TableTarget { get; }
Property Value
- DBTarget
addonOwner
[AttHidden]
[AttLenght(25)]
[AttFieldType(AttFieldType.InputTypes.string, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.NotEditLoop })]
public string addonOwner { get; set; }
Property Value
- string
logInfo
[AttVirtualField]
[AttHidden]
[AttFieldType(AttFieldType.InputTypes.string, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.NotEditLoop })]
public string logInfo { get; set; }
Property Value
- string
ousrdata
[AttDefaultValue("getdate()")]
[AttFieldType(AttFieldType.InputTypes.date, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.NotEditLoop })]
public virtual DateTime ousrdata { get; set; }
Property Value
- DateTime
ousrhora
[AttLenght(8)]
[AttFieldType(AttFieldType.InputTypes.time, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.NotEditLoop })]
public virtual string ousrhora { get; set; }
Property Value
- string
ousrinis
[AttLenght(30)]
[AttFieldType(AttFieldType.InputTypes.string, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.NotEditLoop })]
public string ousrinis { get; set; }
Property Value
- string
revisionNumber
Número da revision do registo, sempre que existe uma alteração, a revision irá ser incrementada
[AttLenght(10)]
[AttHidden]
[AttFieldType(AttFieldType.InputTypes.integer, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.NotEditLoop })]
public int revisionNumber { get; set; }
Property Value
- int
syshist
[AttVirtualField]
[AttHidden]
[AttFieldType(AttFieldType.InputTypes.boolean, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.NotEditLoop })]
public bool syshist { get; set; }
Property Value
- bool
usrdata
[AttDefaultValue("getdate()")]
[AttFieldType(AttFieldType.InputTypes.date, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.NotEditLoop })]
public DateTime usrdata { get; set; }
Property Value
- DateTime
usrhora
[AttLenght(8)]
[AttFieldType(AttFieldType.InputTypes.time, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.NotEditLoop })]
public string usrhora { get; set; }
Property Value
- string
usrinis
[AttLenght(30)]
[AttFieldType(AttFieldType.InputTypes.string, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.NotEditLoop })]
public string usrinis { get; set; }
Property Value
- string
Methods
Clone()
Returns
- GenericVO
Clone(bool)
public GenericVO Clone(bool oldVO)
Parameters
| Nome |
Tipo |
Descrição |
oldVO |
bool |
|
Returns
- GenericVO
Clone(bool, bool)
Retorna um novo VO com uma cópia dos valores e copia de propriedades tipo objecto
public GenericVO Clone(bool oldVO, bool cloneCollections)
Parameters
| Nome |
Tipo |
Descrição |
oldVO |
bool |
|
cloneCollections |
bool |
|
Returns
- GenericVO
Clone<T>()
public T Clone<T>() where T : GenericVO
Returns
- T
Type Parameters
T
Clone<T>(bool)
public T Clone<T>(bool oldVO) where T : GenericVO
Parameters
| Nome |
Tipo |
Descrição |
oldVO |
bool |
|
Returns
- T
Type Parameters
T
Clone<T>(bool, bool)
public T Clone<T>(bool oldVO, bool cloneCollections) where T : GenericVO
Parameters
| Nome |
Tipo |
Descrição |
oldVO |
bool |
|
cloneCollections |
bool |
|
Returns
- T
Type Parameters
T
Commit()
public GenericVO Commit()
Returns
- GenericVO
CommitButKeepOperation()
public GenericVO CommitButKeepOperation()
Returns
- GenericVO
CommitWithLazyLoading()
public GenericVO CommitWithLazyLoading()
Returns
- GenericVO
Commit<T>()
public T Commit<T>() where T : GenericVO
Returns
- T
Type Parameters
T
CopyCollections(GenericVO)
public void CopyCollections(GenericVO sourceEntity)
Parameters
DeleteAllCollections()
public void DeleteAllCollections()
Equals(object)
public override bool Equals(object obj)
Parameters
| Nome |
Tipo |
Descrição |
obj |
object |
|
Returns
- bool
FillAddonOwner()
public void FillAddonOwner()
FillAuditProperties()
public void FillAuditProperties()
FillAuditProperties(string)
public void FillAuditProperties(string userCode)
Parameters
| Nome |
Tipo |
Descrição |
userCode |
string |
|
FillCollectionStamp(CollectionStruc, GenericVO)
public void FillCollectionStamp(CollectionStruc collectionItem, GenericVO child)
Parameters
FillStamps()
public string FillStamps()
Returns
- string
FillStamps(bool)
Any change where see EndSerialization
public string FillStamps(bool reset)
Parameters
| Nome |
Tipo |
Descrição |
reset |
bool |
|
Returns
- string
GetInstance(Type, bool)
public static GenericVO GetInstance(Type entityType, bool setStamp = true)
Parameters
| Nome |
Tipo |
Descrição |
entityType |
Type |
|
setStamp |
bool |
|
Returns
- GenericVO
GetInstance<T>()
public static T GetInstance<T>() where T : GenericVO
Returns
- T
Type Parameters
T
GetInstance<T>(Type)
public static T GetInstance<T>(Type entityType) where T : GenericVO
Parameters
| Nome |
Tipo |
Descrição |
entityType |
Type |
|
Returns
- T
Type Parameters
T
GetLogInfo()
protected virtual string GetLogInfo()
Returns
- string
GetLogInfo(List<FieldStructure>, List<object>)
public static string GetLogInfo(List<FieldStructure> logInfoFields, List<object> logInfoValues)
Parameters
Returns
- string
GetNewInstance()
public GenericVO GetNewInstance()
Returns
- GenericVO
GetNewInstance(Type)
public static GenericVO GetNewInstance(Type entityType)
Parameters
| Nome |
Tipo |
Descrição |
entityType |
Type |
|
Returns
- GenericVO
GetNewInstanceFromClone<T>(T)
public static T GetNewInstanceFromClone<T>(T objToClone) where T : GenericVO
Parameters
| Nome |
Tipo |
Descrição |
objToClone |
T |
|
Returns
- T
Type Parameters
T
GetNewInstance<T>()
public static T GetNewInstance<T>() where T : GenericVO
Returns
- T
Type Parameters
T
GetNewInstance<T>(Type)
public static T GetNewInstance<T>(Type entityType) where T : GenericVO
Parameters
| Nome |
Tipo |
Descrição |
entityType |
Type |
|
Returns
- T
Type Parameters
T
GetNewInstances<T>(int)
public static List<T> GetNewInstances<T>(int numNewInstances) where T : GenericVO
Parameters
| Nome |
Tipo |
Descrição |
numNewInstances |
int |
|
Returns
- List<T>
Type Parameters
T
GetPropertiesValue(List<string>)
public List<object> GetPropertiesValue(List<string> properties)
Parameters
Returns
- List<object>
GetPropertyValue(string, VOStructure)
Not support alias or brackets, only "NOME" and not "FT.NOME" or "[FT].[NOME]"
the propertyName maybe a field or a collection
this method is StringComparer.OrdinalIgnoreCase
public object GetPropertyValue(string propertyName, VOStructure strucReference)
Parameters
Returns
- object
GetPropertyValue<T>(string)
Not support alias or brackets, only "NOME" and not "FT.NOME" or "[FT].[NOME]"
the propertyName maybe a field or a collection
this method is StringComparer.OrdinalIgnoreCase
public T GetPropertyValue<T>(string propertyName)
Parameters
| Nome |
Tipo |
Descrição |
propertyName |
string |
|
Returns
- T
Type Parameters
T
IsAnyFieldsAvailable(params string[])
public bool IsAnyFieldsAvailable(params string[] fields)
Parameters
| Nome |
Tipo |
Descrição |
fields |
string[] |
|
Returns
- bool
IsFieldsAvailable(params string[])
public bool IsFieldsAvailable(params string[] fields)
Parameters
| Nome |
Tipo |
Descrição |
fields |
string[] |
|
Returns
- bool
LoadAllCollections()
public virtual void LoadAllCollections()
LoadXML<T>(string)
public virtual T LoadXML<T>(string xmlString) where T : GenericVO
Parameters
| Nome |
Tipo |
Descrição |
xmlString |
string |
|
Returns
- T
Type Parameters
T
OldVO<T>()
public T OldVO<T>() where T : GenericVO
Returns
- T
Type Parameters
T
OldValue(string)
public object OldValue(string fieldName)
Parameters
| Nome |
Tipo |
Descrição |
fieldName |
string |
|
Returns
- object
OldValueOrEmpty(string)
public object OldValueOrEmpty(string fieldName)
Parameters
| Nome |
Tipo |
Descrição |
fieldName |
string |
|
Returns
- object
OldValue<T>(string)
public T OldValue<T>(string fieldName)
Parameters
| Nome |
Tipo |
Descrição |
fieldName |
string |
|
Returns
- T
Type Parameters
T
OnChanged<T>(T, ref T, string)
public override bool OnChanged<T>(T newValue, ref T oldValue, string propertyName = "")
Parameters
| Nome |
Tipo |
Descrição |
newValue |
T |
|
oldValue |
T |
|
propertyName |
string |
|
Returns
- bool
Type Parameters
T
OnGetNewInstance()
protected virtual void OnGetNewInstance()
OnPropertyChanged<T>(string, object, ref T)
public override bool OnPropertyChanged<T>(string propertyName, object newValue, ref T oldValue)
Parameters
| Nome |
Tipo |
Descrição |
propertyName |
string |
|
newValue |
object |
|
oldValue |
T |
|
Returns
- bool
Type Parameters
T
OnPropertyChanged<T>(string, object, ref T, bool)
public override bool OnPropertyChanged<T>(string propertyName, object newValue, ref T oldValue, bool alltrim)
Parameters
Returns
- bool
Type Parameters
T
PrepareForFrontEnd()
public void PrepareForFrontEnd()
RemoveDeletedCollections()
public void RemoveDeletedCollections()
Requery()
public virtual GenericVO Requery()
Returns
- GenericVO
ResetFieldValue(string)
public void ResetFieldValue(string fieldName)
Parameters
| Nome |
Tipo |
Descrição |
fieldName |
string |
|
RevertPropertyValue(string)
public void RevertPropertyValue(string propertyName)
Parameters
| Nome |
Tipo |
Descrição |
propertyName |
string |
|
RollBack()
RollBackCollections()
public void RollBackCollections()
SetOldValue(string, object)
public void SetOldValue(string fieldName, object value)
Parameters
SetStampValue(string)
public virtual void SetStampValue(string stampID)
Parameters
| Nome |
Tipo |
Descrição |
stampID |
string |
|
toString()
public override string toString()
Returns
- string
ToXML()
public virtual string ToXML()
Returns
- string
Update(GenericVO)
public bool Update(GenericVO entityFromCacheOrSql)
Parameters
| Nome |
Tipo |
Descrição |
entityFromCacheOrSql |
GenericVO |
|
Returns
- bool
Update(GenericVO, UpdateConcurrencyTypes, List<string>)
public bool Update(GenericVO entityFromCacheOrSql, UpdateConcurrencyTypes updateConcurrencyType, List<string> feedback)
Parameters
Returns
- bool
loadCollections()
public void loadCollections()
Explicit Interface Implementations
AfterImport()
virtual void AfterImport()
AfterLoad()
BeforeSave()
virtual void BeforeSave()
EndSerialization(IGenericVO)
override void EndSerialization(IGenericVO parentItem = null)
Parameters
FillParent()
FillParent(GenericVO)
void FillParent(GenericVO parentItem)
Parameters
GetPropertyValue(string)
Not support alias or brackets, only "NOME" and not "FT.NOME" or "[FT].[NOME]"
the propertyName maybe a field or a collection
this method is StringComparer.OrdinalIgnoreCase
object GetPropertyValue(string propertyName)
Parameters
| Nome |
Tipo |
Descrição |
propertyName |
string |
|
Returns
- object
GetStructure()
IVOStructure GetStructure()
Returns
- IVOStructure
IsEmptyInstance
virtual bool IsEmptyInstance { get; set; }
Returns
- bool
Operation
Indica o tipo de gravaçâo na base de dados
OperationEnum Operation { get; set; }
Returns
- OperationEnum
-
O tipo de gravação na base de dados poderá ser um de três tipos:
.
Criação (Novo) a que corresponde o valor 1
.
Actualização (Modificação) a que corresponde o valor 2
.
Remover (Apagar) a que corresponde o valor 3
.
SetPropertyValue(string, object)
Not support alias or brackets, only "NOME" and not "FT.NOME" or "[FT].[NOME]"
the propertyName maybe a field or a collection
this method is StringComparer.OrdinalIgnoreCase
void SetPropertyValue(string propertyName, object value)
Parameters