internal RoleBetweenValue(ExtentFiltered extent, IRoleType roleType, object first, object second) { extent.CheckRole(roleType); PredicateAssertions.ValidateRoleBetween(roleType, first, second); this.roleType = roleType; this.first = roleType.Normalize(first); this.second = roleType.Normalize(second); }
internal AllorsPredicateRoleBetweenValueSql(AllorsExtentFilteredSql extent, IRoleType roleType, Object first, Object second) { extent.CheckRole(roleType); PredicateAssertions.ValidateRoleBetween(roleType, first, second); this.roleType = roleType; this.first = roleType.ObjectType is IUnit ? roleType.Normalize(first) : first; this.second = roleType.ObjectType is IUnit ? roleType.Normalize(second) : second; }
internal AllorsPredicateRoleBetweenValueSql(AllorsExtentFilteredSql extent, IRoleType roleType, Object first, Object second) { extent.CheckRole(roleType); PredicateAssertions.ValidateRoleBetween(roleType, first, second); this.roleType = roleType; this.first = roleType.ObjectType is IUnit?roleType.Normalize(first) : first; this.second = roleType.ObjectType is IUnit?roleType.Normalize(second) : second; }
internal RoleLessThanValue(ExtentFiltered extent, IRoleType roleType, object obj) { extent.CheckRole(roleType); PredicateAssertions.ValidateRoleLessThan(roleType, obj); this.roleType = roleType; this.obj = roleType.Normalize(obj); }
internal AllorsPredicateRoleGreaterThanValueSql(AllorsExtentFilteredSql extent, IRoleType roleType, Object obj) { extent.CheckRole(roleType); PredicateAssertions.ValidateRoleGreaterThan(roleType, obj); this.roleType = roleType; this.obj = roleType.ObjectType is IUnit?roleType.Normalize(obj) : obj; }
internal AllorsPredicateRoleGreaterThanValueSql(AllorsExtentFilteredSql extent, IRoleType roleType, Object obj) { extent.CheckRole(roleType); PredicateAssertions.ValidateRoleGreaterThan(roleType, obj); this.roleType = roleType; this.obj = roleType.ObjectType is IUnit ? roleType.Normalize(obj) : obj; }
public RoleGreaterThanValue(ExtentFiltered extent, IRoleType roleType, object obj) { extent.CheckRole(roleType); CompositePredicateAssertions.ValidateRoleGreaterThan(roleType, obj); this.roleType = roleType; this.obj = roleType.Normalize(obj); }
public void SetUnitRole(IRoleType roleType, object unit) { if (unit == null) { this.RemoveUnitRole(roleType); return; } this.AssertNotDeleted(); RoleAssertions.UnitRoleChecks(this, roleType); unit = roleType.Normalize(unit); this.session.SetUnitRole(this.objectId, roleType, unit); }
internal RoleEqualsValue(ExtentFiltered extent, IRoleType roleType, object obj) { extent.CheckRole(roleType); PredicateAssertions.ValidateRoleEquals(roleType, obj); this.roleType = roleType; if (obj is Enum) { if (((IUnit)roleType.ObjectType).IsInteger) { this.obj = (int)obj; } else { throw new Exception("Role Object Type " + roleType.ObjectType.Name + " doesn't support enumerations."); } } else { this.obj = roleType.ObjectType.IsUnit ? roleType.Normalize(obj) : obj; } }
internal RoleEqualsValue(ExtentFiltered extent, IRoleType roleType, object obj) { extent.CheckRole(roleType); PredicateAssertions.ValidateRoleEquals(roleType, obj); this.roleType = roleType; if (obj is Enum) { if (((IUnit)roleType.ObjectType).IsInteger) { this.obj = (Int32)obj; } else { throw new Exception("Role Object Type " + roleType.ObjectType.Name + " doesn't support enumerations."); } } else { this.obj = roleType.ObjectType.IsUnit ? roleType.Normalize(obj) : obj; } }
internal AllorsPredicateRoleUnitEqualsValueSql(AllorsExtentFilteredSql extent, IRoleType roleType, Object obj) { extent.CheckRole(roleType); PredicateAssertions.ValidateRoleEquals(roleType, obj); this.roleType = roleType; if (obj is Enum) { var unitType = roleType.ObjectType as IUnit; if (unitType != null && unitType.IsInteger) { this.obj = (int)obj; } else { throw new Exception("Role Object Type " + roleType.ObjectType.SingularName + " doesn't support enumerations."); } } else { this.obj = roleType.ObjectType is IUnit?roleType.Normalize(obj) : obj; } }
internal AllorsPredicateRoleUnitEqualsValueSql(AllorsExtentFilteredSql extent, IRoleType roleType, Object obj) { extent.CheckRole(roleType); PredicateAssertions.ValidateRoleEquals(roleType, obj); this.roleType = roleType; if (obj is Enum) { var unitType = roleType.ObjectType as IUnit; if (unitType != null && unitType.IsInteger) { this.obj = (int)obj; } else { throw new Exception("Role Object Type " + roleType.ObjectType.SingularName + " doesn't support enumerations."); } } else { this.obj = roleType.ObjectType is IUnit ? roleType.Normalize(obj) : obj; } }
public virtual void SetUnitRole(IRoleType roleType, object role) { this.AssertExist(); RoleAssertions.UnitRoleChecks(this, roleType); if (role != null) { role = roleType.Normalize(role); } var oldUnit = this.GetUnitRole(roleType); if (!Equals(oldUnit, role)) { this.Roles.SetUnitRole(roleType, role); } }