// =============================================================================== // Constructor // =========== public ColumnInfo(DBMeta dbmeta, String columnDbName, String columnSqlName , String columnSynonym, String columnAlias, bool notNull, String propertyName , Type propertyType, bool primary, String columnDbType, int?columnSize , int?columnDecimalDigits, bool commonColumn, OptimisticLockType optimisticLockType , String columnComment, List <String> foreignPropList, List <String> referrerPropList) { AssertObjectNotNull("dbmeta", dbmeta); AssertObjectNotNull("columnDbName", columnDbName); AssertObjectNotNull("columnSqlName", columnSqlName); AssertObjectNotNull("propertyName", propertyName); AssertObjectNotNull("propertyType", propertyType); AssertObjectNotNull("optimisticLockType", optimisticLockType); this.dbmeta = dbmeta; this.columnDbName = columnDbName; this.columnSqlName = columnSqlName; this.columnSynonym = columnSynonym; this.columnAlias = columnAlias; this.notNull = notNull; this.propertyName = propertyName; this.propertyType = propertyType; this.primary = primary; this.columnDbType = columnDbType; this.columnSize = columnSize; this.columnDecimalDigits = columnDecimalDigits; this.commonColumn = commonColumn; this.optimisticLockType = optimisticLockType; this.columnComment = columnComment; this.foreignPropList = foreignPropList != null ? foreignPropList : EMPTY_LIST; this.referrerPropList = referrerPropList != null ? referrerPropList : EMPTY_LIST; }
// createColumnInfo() protected ColumnInfo cci(String columnDbName, String columnSqlName , String columnSynonym, String columnAlias, bool notNull , String propertyName, Type propertyType, bool primary, String columnDbType , int?columnSize, int?columnDecimalDigits, bool commonColumn , OptimisticLockType optimisticLockType, String columnComment , String foreignListExp, String referrerListExp) { char delimiter = ','; List <String> foreignPropList = null; if (foreignListExp != null && foreignListExp.Trim().Length > 0) { foreignPropList = new ArrayList <String>(); String[] foreignPropArray = foreignListExp.Split(delimiter); foreach (String foreignProp in foreignPropArray) { foreignPropList.add(foreignProp.Trim()); } } List <String> referrerPropList = null; if (referrerListExp != null && referrerListExp.Trim().Length > 0) { referrerPropList = new ArrayList <String>(); String[] referrerPropArray = referrerListExp.Split(delimiter); foreach (String referrerProp in referrerPropArray) { referrerPropList.add(referrerProp.Trim()); } } return(new ColumnInfo(this, columnDbName, columnSqlName , columnSynonym, columnAlias, notNull, propertyName , propertyType, primary, columnDbType, columnSize, columnDecimalDigits, commonColumn , optimisticLockType, columnComment, foreignPropList, referrerPropList)); }
public static Versioning.OptimisticLock Convert(OptimisticLockType @enum) { switch (@enum) { case OptimisticLockType.All: return Versioning.OptimisticLock.All; case OptimisticLockType.Dirty: return Versioning.OptimisticLock.Dirty; case OptimisticLockType.None: return Versioning.OptimisticLock.None; case OptimisticLockType.Version: return Versioning.OptimisticLock.Version; default: return default(Versioning.OptimisticLock); } }
public static Versioning.OptimisticLock Convert(OptimisticLockType @enum) { switch (@enum) { case OptimisticLockType.All: return(Versioning.OptimisticLock.All); case OptimisticLockType.Dirty: return(Versioning.OptimisticLock.Dirty); case OptimisticLockType.None: return(Versioning.OptimisticLock.None); case OptimisticLockType.Version: return(Versioning.OptimisticLock.Version); default: return(default(Versioning.OptimisticLock)); } }
private void BindHibernateAnnotation(EntityAttribute hibAnn) { if (hibAnn != null) { dynamicInsert = hibAnn.IsDynamicInsert; dynamicUpdate = hibAnn.IsDynamicUpdate; optimisticLockType = hibAnn.OptimisticLock; selectBeforeUpdate = hibAnn.IsSelectBeforeUpdate; polymorphismType = hibAnn.Polymorphism; explicitHibernateEntityAnnotation = true; //persister handled in bind } else { //default values when the annotation is not there dynamicInsert = false; dynamicUpdate = false; optimisticLockType = OptimisticLockType.Version; polymorphismType = PolymorphismType.Implicit; selectBeforeUpdate = false; } }
private void BindHibernateAnnotation(EntityAttribute hibAnn) { if (hibAnn != null) { dynamicInsert = hibAnn.IsDynamicInsert; dynamicUpdate = hibAnn.IsDynamicUpdate; optimisticLockType = hibAnn.OptimisticLock; selectBeforeUpdate = hibAnn.IsSelectBeforeUpdate; polymorphismType = hibAnn.Polymorphism; explicitHibernateEntityAnnotation = true; //persister handled in bind } else { //default values when the annotation is not there dynamicInsert = false; dynamicUpdate = false; optimisticLockType = OptimisticLockType.Version; polymorphismType = PolymorphismType.Implicit; selectBeforeUpdate = false; } }