Search in sources :

Example 1 with EntityId

use of jetbrains.exodus.entitystore.EntityId in project xodus by JetBrains.

the class EntityTypeFilteredIterator method checkHasNext.

private void checkHasNext() {
    if (!hasNextValid) {
        hasNextValid = true;
        nextId = null;
        while (source.hasNext()) {
            final EntityId nextId = source.nextId();
            if (nextId == null || entityTypeId == nextId.getTypeId()) {
                this.nextId = nextId;
                hasNext = true;
                return;
            }
        }
        hasNext = false;
    }
}
Also used : EntityId(jetbrains.exodus.entitystore.EntityId)

Example 2 with EntityId

use of jetbrains.exodus.entitystore.EntityId in project xodus by JetBrains.

the class OrderedEntityIdCollectionIterator method nextId.

@Override
@Nullable
public EntityId nextId() {
    EntityId result = sourceIterator.next();
    index++;
    return result;
}
Also used : EntityId(jetbrains.exodus.entitystore.EntityId) Nullable(org.jetbrains.annotations.Nullable)

Example 3 with EntityId

use of jetbrains.exodus.entitystore.EntityId in project xodus by JetBrains.

the class ReverseOrderedEntityIdCollectionIterator method nextIdImpl.

@Override
@Nullable
public EntityId nextIdImpl() {
    EntityId result = sourceIterator.next();
    index++;
    return result;
}
Also used : EntityId(jetbrains.exodus.entitystore.EntityId) Nullable(org.jetbrains.annotations.Nullable)

Example 4 with EntityId

use of jetbrains.exodus.entitystore.EntityId in project xodus by JetBrains.

the class ReverseOrderedEntityIdCollectionIterator method nextId.

@Override
@Nullable
public EntityId nextId() {
    EntityId result = sourceIterator.next();
    index++;
    return result;
}
Also used : EntityId(jetbrains.exodus.entitystore.EntityId) Nullable(org.jetbrains.annotations.Nullable)

Example 5 with EntityId

use of jetbrains.exodus.entitystore.EntityId in project meghanada-server by mopemope.

the class CachedASMReflector method addClassIndex.

private void addClassIndex(ClassIndex newIndex, File file) {
    final String fqcn = newIndex.getRawDeclaration();
    ClassIndex old = this.globalClassIndex.get(fqcn);
    if (nonNull(old)) {
        EntityId entityId = old.getEntityId();
        if (nonNull(entityId)) {
            // inheriting entityID
            newIndex.setEntityID(entityId);
        }
    }
    try {
        if (ModuleHelper.isJrtFsFile(file)) {
            newIndex.setFilePath(file.getPath());
        } else {
            newIndex.setFilePath(file.getCanonicalPath());
        }
    } catch (IOException e) {
        throw new UncheckedIOException(e);
    }
    this.globalClassIndex.put(fqcn, newIndex);
}
Also used : EntityId(jetbrains.exodus.entitystore.EntityId) ClassIndex(meghanada.reflect.ClassIndex) UncheckedIOException(java.io.UncheckedIOException) IOException(java.io.IOException) UncheckedIOException(java.io.UncheckedIOException)

Aggregations

EntityId (jetbrains.exodus.entitystore.EntityId)12 Nullable (org.jetbrains.annotations.Nullable)6 IOException (java.io.IOException)3 UncheckedIOException (java.io.UncheckedIOException)3 Entity (jetbrains.exodus.entitystore.Entity)3 EntityIterable (jetbrains.exodus.entitystore.EntityIterable)2 ClassIndex (meghanada.reflect.ClassIndex)2 Serializable (java.io.Serializable)1 IntArrayList (jetbrains.exodus.core.dataStructures.IntArrayList)1 LongArrayList (jetbrains.exodus.core.dataStructures.LongArrayList)1 EntityIterableHandle (jetbrains.exodus.entitystore.EntityIterableHandle)1 EntityStoreException (jetbrains.exodus.entitystore.EntityStoreException)1 EntityIterableHandleBase (jetbrains.exodus.entitystore.iterate.EntityIterableHandleBase)1 NotNull (org.jetbrains.annotations.NotNull)1