core/src/main/java/com/orientechnologies/orient/core/db/document/ODatabaseDocumentAbstract.java
public boolean executeHideRecord(OIdentifiable record, final OPERATION_MODE iMode) {
    checkOpenness();
    checkIfActive();

    final ORecordId rid = (ORecordId) record.getIdentity();

    if (rid == null)
      throw new ODatabaseException(
          "Cannot hide record because it has no identity. Probably was created from scratch or contains projections of fields rather than a full record");

    if (!rid.isValid())
      return false;

    checkSecurity(ORule.ResourceGeneric.CLUSTER, ORole.PERMISSION_DELETE, getClusterNameById(rid.getClusterId()));

    getMetadata().makeThreadLocalSchemaSnapshot();
    if (record instanceof ODocument)
      ODocumentInternal.checkClass((ODocument) record, this);
    ORecordSerializationContext.pushContext();
    try {

      final OStorageOperationResult<Boolean> operationResult;
      operationResult = getStorage().hideRecord(rid, iMode.ordinal(), null);

      // REMOVE THE RECORD FROM 1 AND 2 LEVEL CACHES
      if (!operationResult.isMoved())
        getLocalCache().deleteRecord(rid);

      return operationResult.getResult();
    } finally {
      ORecordSerializationContext.pullContext();
      getMetadata().clearThreadLocalSchemaSnapshot();
    }
  }
public boolean executeHideRecord(OIdentifiable record, final OPERATION_MODE iMode) {
    checkOpenness();
    checkIfActive();

    final ORecordId rid = (ORecordId) record.getIdentity();

    if (rid == null)
      throw new ODatabaseException(
          "Cannot hide record because it has no identity. Probably was created from scratch or contains projections of fields rather than a full record");

    if (!rid.isValid())
      return false;

    checkSecurity(ORule.ResourceGeneric.CLUSTER, ORole.PERMISSION_DELETE, getClusterNameById(rid.getClusterId()));

    getMetadata().makeThreadLocalSchemaSnapshot();
    if (record instanceof ODocument)
      ODocumentInternal.checkClass((ODocument) record, this);
    ORecordSerializationContext.pushContext();
    try {

      final OStorageOperationResult<Boolean> operationResult;
      operationResult = getStorage().hideRecord(rid, iMode.ordinal(), null);

      // REMOVE THE RECORD FROM 1 AND 2 LEVEL CACHES
      if (!operationResult.isMoved())
        getLocalCache().deleteRecord(rid);

      return operationResult.getResult();
    } finally {
      ORecordSerializationContext.pullContext();
      getMetadata().clearThreadLocalSchemaSnapshot();
    }
  }
public boolean executeHideRecord ( OIdentifiable record , final OPERATION_MODE iMode ) { checkOpenness ( ) ; checkIfActive ( ) ; final ORecordId rid = ( ORecordId ) record . getIdentity ( ) ; if ( rid == null ) throw new ODatabaseException ( "Cannot hide record because it has no identity. Probably was created from scratch or contains projections of fields rather than a full record" ) ; if ( ! rid . isValid ( ) ) return false ; checkSecurity ( ORule . ResourceGeneric . CLUSTER , ORole . PERMISSION_DELETE , getClusterNameById ( rid . getClusterId ( ) ) ) ; getMetadata ( ) . makeThreadLocalSchemaSnapshot ( ) ; if ( record instanceof ODocument ) ODocumentInternal . checkClass ( ( ODocument ) record , this ) ; ORecordSerializationContext . pushContext ( ) ; try { final OStorageOperationResult < Boolean > operationResult ; operationResult = getStorage ( ) . hideRecord ( rid , iMode . ordinal ( ) , null ) ; // REMOVE THE RECORD FROM 1 AND 2 LEVEL CACHES if ( ! operationResult . isMoved ( ) ) getLocalCache ( ) . deleteRecord ( rid ) ; return operationResult . getResult ( ) ; } finally { ORecordSerializationContext . pullContext ( ) ; getMetadata ( ) . clearThreadLocalSchemaSnapshot ( ) ; } }
This method is internal, it can be subject to signature change or be removed, do not use.

@Internal
This method is internal it can be subject to signature change or be removed do not use .