Tabnine Logo
com.orientechnologies.orient.core.id
Code IndexAdd Tabnine to your IDE (free)

How to use com.orientechnologies.orient.core.id

Best Java code snippets using com.orientechnologies.orient.core.id (Showing top 20 results out of 315)

origin: com.orientechnologies/orientdb-core

protected ORecordAbstract setIdentity(final int iClusterId, final long iClusterPosition) {
 if (_recordId == null || _recordId == ORecordId.EMPTY_RECORD_ID)
  _recordId = new ORecordId(iClusterId, iClusterPosition);
 else {
  _recordId.setClusterId(iClusterId);
  _recordId.setClusterPosition(iClusterPosition);
 }
 return this;
}
origin: com.orientechnologies/orientdb-core

 @Override
 protected final ORID getImmutableResourceId(final ORID iResourceId) {
  return new ORecordId(iResourceId);
 }
}
origin: com.orientechnologies/orientdb-core

@Override
public boolean equals(final Object obj) {
 if (!(obj instanceof OPlaceholder))
  return false;
 final OPlaceholder other = (OPlaceholder) obj;
 return rid.equals(other.rid) && recordVersion == other.recordVersion;
}
origin: com.orientechnologies/orientdb-core

private static OIdentifiable readLinkOptimizedSBTree(final BytesContainer bytes) {
 ORID rid = new ORecordId(OVarIntSerializer.readAsInteger(bytes), OVarIntSerializer.readAsLong(bytes));
 final OIdentifiable identifiable;
 if (rid.isTemporary() && rid.getRecord() != null)
  identifiable = rid.getRecord();
 else
  identifiable = rid;
 return identifiable;
}
origin: com.orientechnologies/orientdb-core

protected static int writeNullLink(final BytesContainer bytes) {
 final int pos = OVarIntSerializer.write(bytes, NULL_RECORD_ID.getIdentity().getClusterId());
 OVarIntSerializer.write(bytes, NULL_RECORD_ID.getIdentity().getClusterPosition());
 return pos;
}
origin: com.orientechnologies/orientdb-core

/**
 * Copy constructor.
 *
 * @param parentRid Source object
 */
public ORecordId(final ORID parentRid) {
 clusterId = parentRid.getClusterId();
 clusterPosition = parentRid.getClusterPosition();
}
origin: com.orientechnologies/orientdb-core

@Override
public <T extends ORecord> T getRecord() {
 return rid.getRecord();
}
origin: com.orientechnologies/orientdb-core

 private boolean outsideOfTheRange(ORID orid) {
  if (beginRange != null && orid.compareTo(beginRange) < 0)
   return true;

  if (endRange != null && orid.compareTo(endRange) > 0)
   return true;

  return false;
 }
}
origin: com.orientechnologies/orientdb-core

@Override
public String toString() {
 return rid.toString() + " v." + recordVersion;
}
origin: com.orientechnologies/orientdb-core

protected boolean checkCurrentPosition() {
 if (currentEntry == ORID.CLUSTER_POS_INVALID || firstClusterEntry > currentEntry || lastClusterEntry < currentEntry)
  return false;
 current.setClusterPosition(currentEntry);
 return true;
}
origin: com.orientechnologies/orientdb-core

@Override
public String toString() {
 return generateString(clusterId, clusterPosition);
}
origin: com.orientechnologies/orientdb-core

public ORecordAbstract copyTo(final ORecordAbstract cloned) {
 cloned._source = _source;
 cloned._size = _size;
 cloned._recordId = _recordId.copy();
 cloned._recordVersion = _recordVersion;
 cloned._status = _status;
 cloned._recordFormat = _recordFormat;
 cloned._listeners = null;
 cloned._dirty = false;
 cloned._contentChanged = false;
 cloned._dirtyManager = null;
 return cloned;
}
origin: com.orientechnologies/orientdb-core

@Override
public int compareTo(OIdentifiable o) {
 return rid.compareTo(o);
}
origin: com.orientechnologies/orientdb-core

@Override
public int hashCode() {
 return _recordId != null ? _recordId.hashCode() : 0;
}
origin: com.orientechnologies/orientdb-core

public ORecordId(final int iClusterId, final long iPosition) {
 clusterId = iClusterId;
 checkClusterLimits();
 clusterPosition = iPosition;
}
origin: com.orientechnologies/orientdb-core

private static OIdentifiable readLinkOptimizedEmbedded(final BytesContainer bytes) {
 ORID rid = new ORecordId(OVarIntSerializer.readAsInteger(bytes), OVarIntSerializer.readAsLong(bytes));
 OIdentifiable identifiable = null;
 if (rid.isTemporary())
  identifiable = rid.getRecord();
 if (identifiable == null)
  identifiable = rid;
 return identifiable;
}
origin: com.orientechnologies/orientdb-core

@Override
public ORID nextRid() {
 return new ORecordId(clusterId, clusterPosition + 1);
}
origin: com.orientechnologies/orientdb-core

private int writeNullLink(final BytesContainer bytes) {
 final int pos = OVarIntSerializer.write(bytes, NULL_RECORD_ID.getIdentity().getClusterId());
 OVarIntSerializer.write(bytes, NULL_RECORD_ID.getIdentity().getClusterPosition());
 return pos;
}
origin: com.orientechnologies/orientdb-core

private int writeNullLink(final BytesContainer bytes) {
 final int pos = OVarIntSerializer.write(bytes, NULL_RECORD_ID.getIdentity().getClusterId());
 OVarIntSerializer.write(bytes, NULL_RECORD_ID.getIdentity().getClusterPosition());
 return pos;
}
origin: com.orientechnologies/orientdb-core

private int writeNullLink(final BytesContainer bytes) {
 final int pos = OVarIntSerializer.write(bytes, NULL_RECORD_ID.getIdentity().getClusterId());
 OVarIntSerializer.write(bytes, NULL_RECORD_ID.getIdentity().getClusterPosition());
 return pos;
}
com.orientechnologies.orient.core.id

Most used classes

  • ORecordId
  • ORID
    RecordID interface that represents a recordid in database. RecordID are made of 2 numbers: cluster i
  • OContextualRecordId
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now