DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | List of all members
Deveel.Data.Store.ObjectId Struct Reference

A unique identifier of an object within a database system, that is composed by a reference to the store it belongs to and the address of the object itself within the store. More...

Inheritance diagram for Deveel.Data.Store.ObjectId:

Public Member Functions

 ObjectId (int storeId, long id)
 Constructs the ObjectId with the given references to the store and the address. More...
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
bool Equals (ObjectId other)
 
override string ToString ()
 

Properties

int StoreId [get, private set]
 Gets the unique identifier of the store that contains the object. More...
 
long Id [get, private set]
 Gets the unique identifier of the object within the containing store. More...
 

Detailed Description

A unique identifier of an object within a database system, that is composed by a reference to the store it belongs to and the address of the object itself within the store.

It could happen that an object identifier is replicated by multiple stores, but the distinction is made by store: there cannot be two objects in the same store having the same identifier.

Definition at line 31 of file ObjectId.cs.

Constructor & Destructor Documentation

Deveel.Data.Store.ObjectId.ObjectId ( int  storeId,
long  id 
)
inline

Constructs the ObjectId with the given references to the store and the address.

Parameters
storeIdThe id of the store where the object belongs
idThe unique identifier of the object within the store.

Definition at line 38 of file ObjectId.cs.

39  : this() {
40  if (storeId < 0)
41  throw new ArgumentOutOfRangeException("storeId");
42  if (id < 0)
43  throw new ArgumentOutOfRangeException("id");
44 
45  StoreId = storeId;
46  Id = id;
47  }
long Id
Gets the unique identifier of the object within the containing store.
Definition: ObjectId.cs:65
int StoreId
Gets the unique identifier of the store that contains the object.
Definition: ObjectId.cs:56

Member Function Documentation

override bool Deveel.Data.Store.ObjectId.Equals ( object  obj)
inline

Definition at line 68 of file ObjectId.cs.

68  {
69  return Equals((ObjectId)obj);
70  }
ObjectId(int storeId, long id)
Constructs the ObjectId with the given references to the store and the address.
Definition: ObjectId.cs:38
override bool Equals(object obj)
Definition: ObjectId.cs:68
bool Deveel.Data.Store.ObjectId.Equals ( ObjectId  other)
inline

Definition at line 78 of file ObjectId.cs.

78  {
79  return StoreId == other.StoreId &&
80  Id == other.Id;
81  }
long Id
Gets the unique identifier of the object within the containing store.
Definition: ObjectId.cs:65
int StoreId
Gets the unique identifier of the store that contains the object.
Definition: ObjectId.cs:56
override int Deveel.Data.Store.ObjectId.GetHashCode ( )
inline

Definition at line 73 of file ObjectId.cs.

73  {
74  return unchecked ((int)(StoreId*47 ^ Id));
75  }
long Id
Gets the unique identifier of the object within the containing store.
Definition: ObjectId.cs:65
int StoreId
Gets the unique identifier of the store that contains the object.
Definition: ObjectId.cs:56
override string Deveel.Data.Store.ObjectId.ToString ( )
inline

Definition at line 84 of file ObjectId.cs.

84  {
85  return String.Format("0x{0:X}:{1:X}", StoreId, Id);
86  }
A long string in the system.
long Id
Gets the unique identifier of the object within the containing store.
Definition: ObjectId.cs:65
int StoreId
Gets the unique identifier of the store that contains the object.
Definition: ObjectId.cs:56

Property Documentation

long Deveel.Data.Store.ObjectId.Id
getprivate set

Gets the unique identifier of the object within the containing store.

This is a unique value on a store level: in the same store, it cannot happen to find two objects having the same identifier.

Definition at line 65 of file ObjectId.cs.

int Deveel.Data.Store.ObjectId.StoreId
getprivate set

Gets the unique identifier of the store that contains the object.

This is a unique value on a global level: it cannot happen that two stores have the same identifier in the same database system.

Definition at line 56 of file ObjectId.cs.


The documentation for this struct was generated from the following file: