public ChangedObjectInfo(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo oldCi, NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo newCi, int fieldIndex, NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo oldValue, NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo newValue, int objectRecursionLevel) : this(oldCi, newCi, fieldIndex, oldValue, newValue, null, objectRecursionLevel) { }
public override void Execute(NeoDatis.Odb.OID oid, NeoDatis.Odb.Core.Layers.Layer2.Meta.AttributeValuesMap values) { System.Decimal n = (System.Decimal)values[attributeName]; sum = NeoDatis.Tool.Wrappers.NeoDatisNumber.Add(sum, NeoDatis.Odb.Impl.Core.Query.Values.ValuesUtil .Convert(n)); }
/// <summary>The database file name</summary> /// <></> public AbstractStorageEngine(NeoDatis.Odb.Core.Layers.Layer3.IBaseIdentification parameters) { this.provider = NeoDatis.Odb.OdbConfiguration.GetCoreProvider(); this.baseIdentification = parameters; Init(); }
public TransactionIdImpl(NeoDatis.Odb.DatabaseId databaseID, long id1, long id2) : base() { this.databaseId = databaseID; this.id1 = id1; this.id2 = id2; }
public virtual void StartReadingObjectInfoWithOid(NeoDatis.Odb.OID oid, NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo objectInfo) { if (oid == null) { throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.CacheNullOid ); } object[] objects = null; readingObjectInfo.TryGetValue(oid, out objects); // TODO : use a value object instead of an array! if (objects == null) { // The key is the oid, the value is an array of 2 objects : // 1-the read count, 2-The object info // Here we are saying that the object with oid 'oid' is // being read for the first time object[] values = new object[] { (short)1, objectInfo }; readingObjectInfo[oid] = values; } else { // Here the object is already being read. It is necessary to // increase the read count short currentReadCount = ((short)objects[0]); objects[0] = (short)(currentReadCount + 1); } }
protected virtual void Init(NeoDatis.Odb.Core.Transaction.ISession session, string name) { this.name = name; this.session = session; readingObjectInfo = new OdbHashMap<NeoDatis.Odb.OID, object[]>(); }
public ODBRuntimeException(NeoDatis.Odb.Core.IError error, string message) : base (string.Format("{0}\nVersion={1} , Build={2}, Date={3}, Thread={4}\nError:{5}\nStackTrace:{6}" , message1, NeoDatis.Odb.Core.Release.ReleaseNumber, NeoDatis.Odb.Core.Release.ReleaseBuild , NeoDatis.Odb.Core.Release.ReleaseDate, NeoDatis.Tool.Wrappers.OdbThread.GetCurrentThreadName (), error.ToString(), message)) { }
public ServerFileSystemInterface(string name, NeoDatis.Odb.Core.Layers.Layer3.IBaseIdentification parameters, bool canLog, int bufferSize) : base(name, parameters, canLog, bufferSize ) { sessionManager = NeoDatis.Odb.OdbConfiguration.GetCoreProvider().GetClientServerSessionManager (); }
public Player(string name, System.DateTime birthDate, NeoDatis.Odb.Test.VO.Sport.Sport favoriteSport) { this.name = name; this.birthDate = birthDate; this.favoriteSport = favoriteSport; }
public override NeoDatis.Odb.OID WriteNonNativeObjectInfo(NeoDatis.Odb.OID existingOid , NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo objectInfo, long position , bool writeDataInTransaction, bool isNewObject) { // To enable object auto-reconnect on the server side if (NeoDatis.Odb.OdbConfiguration.ReconnectObjectsToSession() && objectInfo.GetHeader ().GetOid() != null) { NeoDatis.Odb.Impl.Core.Server.Transaction.ServerSession session = (NeoDatis.Odb.Impl.Core.Server.Transaction.ServerSession )sessionManager.GetSession(storageEngine.GetBaseIdentification().GetIdentification (), true); NeoDatis.Odb.Core.Layers.Layer2.Meta.ObjectInfoHeader oih = session.GetCache().GetObjectInfoHeaderFromOid (objectInfo.GetOid(), false); // only add in th cache if object does not exist in the cache if (oih == null) { session.GetCache().AddObjectInfo(objectInfo.GetHeader()); } } NeoDatis.Odb.OID roid = base.WriteNonNativeObjectInfo(existingOid, objectInfo, position , writeDataInTransaction, isNewObject); if (objectInfo is NeoDatis.Odb.Core.Server.Layers.Layer2.Meta.ClientNonNativeObjectInfo) { NeoDatis.Odb.Core.Server.Layers.Layer2.Meta.ClientNonNativeObjectInfo cnnoi = (NeoDatis.Odb.Core.Server.Layers.Layer2.Meta.ClientNonNativeObjectInfo )objectInfo; NeoDatis.Odb.Impl.Core.Server.Transaction.ServerSession session = (NeoDatis.Odb.Impl.Core.Server.Transaction.ServerSession )GetSession(); session.AssociateIds(roid, cnnoi.GetLocalOid()); // Adds the abstract Objectinfo in the cache session.GetCache().AddObjectInfo(cnnoi.GetHeader()); } return roid; }
public SameVmClientEngine(NeoDatis.Odb.Core.Server.Layers.Layer3.IODBServerExt server , string baseIdentifier) : base(server.GetParameters(baseIdentifier, true)) { this.server = server; // Call super class init base.InitODBConnection(); }
public PendingReading(int id, NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo ci, NeoDatis.Odb.OID attributeOID) : base() { this.id = id; this.ci = ci; this.attributeOID = attributeOID; }
public StoreMessage(string baseId, string connectionId, NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo nnoi, NeoDatis.Odb.OID[] localOids) : base(NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command .Store, baseId, connectionId) { this.nnoi = nnoi; this.clientIds = localOids; }
public User(string name, string email, NeoDatis.Odb.Test.VO.Login.Profile profile ) : base() { this.name = name; this.email = email; this.profile = profile; }
public override void Execute(NeoDatis.Odb.OID oid, NeoDatis.Odb.Core.Layers.Layer2.Meta.AttributeValuesMap values) { System.Collections.Generic.IList<object> l = (System.Collections.Generic.IList<object >)values[attributeName]; int localFromIndex = fromIndex; int localEndIndex = fromIndex + size; // If not throw exception, we must implement // Index Out Of Bound protection if (!throwExceptionIfOutOfBound) { // Check from index if (localFromIndex > l.Count - 1) { localFromIndex = 0; } // Check end index if (localEndIndex > l.Count) { localEndIndex = l.Count; } } sublist = new NeoDatis.Odb.Impl.Core.Query.List.Objects.LazySimpleListOfAOI<object >(size, GetInstanceBuilder(), ReturnInstance()); sublist.AddAll(NeoDatis.Tool.Wrappers.List.NeoDatisCollectionUtil.SublistGeneric( l, localFromIndex, localEndIndex)); }
public ChangedObjectReferenceAttributeAction(long position, NeoDatis.Odb.Core.Layers.Layer2.Meta.ObjectReference oref, int recursionLevel) { this.updatePosition = position; this.objectReference = oref; this.recursionLevel = recursionLevel; }
public ConnectMessageResponse(string baseId, string connectionId, NeoDatis.Odb.Core.Layers.Layer2.Meta.MetaModel metaModel, NeoDatis.Odb.TransactionId transactionId) : base(NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command .Connect, baseId, connectionId) { this.metaModel = metaModel; this.transactionId = transactionId; }
public override NeoDatis.Odb.OID UpdateNonNativeObjectInfo(NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo nnoi, bool forceUpdate) { // To enable object auto-reconnect on the server side if (NeoDatis.Odb.OdbConfiguration.ReconnectObjectsToSession() && nnoi.GetHeader() .GetOid() != null) { NeoDatis.Odb.Impl.Core.Server.Transaction.ServerSession session = (NeoDatis.Odb.Impl.Core.Server.Transaction.ServerSession )sessionManager.GetSession(storageEngine.GetBaseIdentification().GetIdentification (), true); NeoDatis.Odb.Core.Layers.Layer2.Meta.ObjectInfoHeader oih = session.GetCache().GetObjectInfoHeaderFromOid (nnoi.GetOid(), false); // only add in th cache if object does not exist in the cache if (oih == null) { session.GetCache().AddObjectInfo(nnoi.GetHeader()); } } NeoDatis.Odb.OID roid = base.UpdateNonNativeObjectInfo(nnoi, forceUpdate); if (nnoi is NeoDatis.Odb.Core.Server.Layers.Layer2.Meta.ClientNonNativeObjectInfo) { NeoDatis.Odb.Core.Server.Layers.Layer2.Meta.ClientNonNativeObjectInfo cnnoi = (NeoDatis.Odb.Core.Server.Layers.Layer2.Meta.ClientNonNativeObjectInfo )nnoi; NeoDatis.Odb.Impl.Core.Server.Transaction.ServerSession session = (NeoDatis.Odb.Impl.Core.Server.Transaction.ServerSession )GetSession(); session.AssociateIds(cnnoi.GetOid(), cnnoi.GetLocalOid()); } return roid; }
public override void SetChildAt(NeoDatis.Btree.IBTreeNode child, int index) { children[index] = child; if (child != null) { child.SetParent(this); } }
public DefaultServerIdManager(NeoDatis.Odb.Core.Layers.Layer3.IObjectWriter objectWriter , NeoDatis.Odb.Core.Layers.Layer3.IObjectReader objectReader, long currentBlockIdPosition , int currentBlockIdNumber, NeoDatis.Odb.OID currentMaxId) : base(objectWriter, objectReader, currentBlockIdPosition, currentBlockIdNumber, currentMaxId) { sessionManager = NeoDatis.Odb.OdbConfiguration.GetCoreProvider().GetClientServerSessionManager (); }
public override void Execute(NeoDatis.Odb.OID oid, NeoDatis.Odb.Core.Layers.Layer2.Meta.AttributeValuesMap values) { System.Decimal n = NeoDatis.Odb.Impl.Core.Query.Values.ValuesUtil.Convert((System.Decimal )values[attributeName]); myValue = myValue.Add(new System.Decimal(n.ToString()).Multiply(new System.Decimal (2))); }
public GetObjectValuesMessage(string baseId, string connectionId, NeoDatis.Odb.Core.Query.IValuesQuery query, int startIndex, int endIndex) : base(NeoDatis.Odb.Core.Server.Layers.Layer3.Engine.Command .GetObjectValues, baseId, connectionId) { this.query = query; this.startIndex = startIndex; this.endIndex = endIndex; }
public CollectionObjectInfo(System.Collections.Generic.ICollection<NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo > collection, NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType type, System.Collections.Generic.ICollection <NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo> nonNativeObjects) : base (collection, type) { realCollectionClassName = NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType.DefaultCollectionClassName; SetNonNativeObjects(nonNativeObjects); }
public Game(System.DateTime when, NeoDatis.Odb.Test.VO.Sport.Sport sport, NeoDatis.Odb.Test.VO.Sport.Team team1, NeoDatis.Odb.Test.VO.Sport.Team team2) { this.when = when; this.sport = sport; this.team1 = team1; this.team2 = team2; }
public History(System.DateTime data, NeoDatis.Odb.Test.VO.School.Discipline discipline , int score, NeoDatis.Odb.Test.VO.School.Teacher teacher) { this.date = data; this.discipline = discipline; this.score = score; this.teacher = teacher; }
public ClassInfoList(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo mainClassInfo ) { this.classInfos = new NeoDatis.Tool.Wrappers.Map.OdbHashMap<string, NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo >(); this.classInfos[mainClassInfo.GetFullClassName()] = mainClassInfo; this.mainClassInfo = mainClassInfo; }
public NewNonNativeObjectAction(long position, NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo nnoi, int recursionLevel, string attributeName) { this.updatePosition = position; this.nnoi = nnoi; this.recursionLevel = recursionLevel; this.attributeName = attributeName; }
public virtual bool Match(NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo aoi) { NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo nnoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo )aoi; object aoiValue = nnoi.GetValueOf(attributeName); return Match(aoiValue); }
public Car(string name, int numberOfOccupant, string model, NeoDatis.Odb.Test.Newbie.VO.Driver driver) { this.name = name; this.numberOfOccupant = numberOfOccupant; this.model = model; this.driver = driver; }
public ServerSession(NeoDatis.Odb.Core.Layers.Layer3.IStorageEngine engine, string sessionId) : base(engine, sessionId) { classInfoIds = new NeoDatis.Tool.Wrappers.Map.OdbHashMap<string, NeoDatis.Odb.OID >(); this.sessionManager = NeoDatis.Odb.OdbConfiguration.GetCoreProvider().GetClientServerSessionManager (); }