public Reference(DatabaseSession session, IClass objectType, long objectId, long version) : this(session, objectType, objectId, false) { this.version = version; this.flags[MaskExistsKnown] = true; this.flags[MaskExists] = true; }
public Reference(DatabaseSession session, IClass objectType, long objectId, bool isNew) { this.session = session; this.objectType = objectType; this.objectId = objectId; this.flags[MaskIsNew] = isNew; if (isNew) { this.flags[MaskExistsKnown] = true; this.flags[MaskExists] = true; } }
public IObject ExtentFirst(DatabaseSession session, IRoleType roleType) { CompositeRoles compositeRoles; if (this.ModifiedRolesByRoleType != null && this.ModifiedRolesByRoleType.TryGetValue(roleType, out compositeRoles)) { var objectId = compositeRoles.First; return(objectId == null ? null : session.GetOrCreateAssociationForExistingObject(objectId.Value).Strategy.GetObject()); } var nonModifiedCompositeRoles = this.GetNonModifiedCompositeRoles(roleType); if (nonModifiedCompositeRoles.Length > 0) { return(session.GetOrCreateAssociationForExistingObject(nonModifiedCompositeRoles[0]).Strategy.GetObject()); } return(null); }
public void ExtentCopyTo(DatabaseSession session, IRoleType roleType, Array array, int index) { CompositeRoles compositeRoles; if (this.ModifiedRolesByRoleType != null && this.ModifiedRolesByRoleType.TryGetValue(roleType, out compositeRoles)) { var i = 0; foreach (var objectId in compositeRoles.ObjectIds) { array.SetValue(session.GetOrCreateAssociationForExistingObject(objectId).Strategy.GetObject(), index + i); ++i; } return; } var nonModifiedCompositeRoles = this.GetNonModifiedCompositeRoles(roleType); for (var i = 0; i < nonModifiedCompositeRoles.Length; i++) { var objectId = nonModifiedCompositeRoles[i]; array.SetValue(session.GetOrCreateAssociationForExistingObject(objectId).Strategy.GetObject(), index + i); } }
public ExtentSort(DatabaseSession session, IRoleType roleType, SortDirection direction) { this.session = session; this.roleType = roleType; this.direction = direction; }
public ExtentFiltered(DatabaseSession session, IComposite objectType) { this.session = session; this.objectType = objectType; }
public ExtentFiltered(DatabaseSession session, Strategy strategy, IAssociationType associationType) : this(session, associationType.ObjectType) { this.Strategy = strategy; this.AssociationType = associationType; }
public ExtentFiltered(DatabaseSession session, Strategy strategy, IRoleType roleType) : this(session, (IComposite)roleType.ObjectType) { this.Strategy = strategy; this.RoleType = roleType; }