/** * Construct a new resource from the ID provided. * * @param obj the obj * @param parent the parent * @param id the id * @param scope the request scope */ public PersistentResource(@NonNull T obj, PersistentResource parent, String id, @NonNull RequestScope scope) { this.obj = obj; this.uuid = Optional.ofNullable(id); this.lineage = parent != null ? new ResourceLineage(parent.lineage, parent) : new ResourceLineage(); this.dictionary = scope.getDictionary(); this.type = dictionary.getJsonAliasFor(obj.getClass()); this.transaction = scope.getTransaction(); this.requestScope = scope; dictionary.initializeEntity(obj); }
/** * Construct a new resource from the ID provided. * * @param obj the obj * @param parent the parent * @param id the id * @param scope the request scope */ public PersistentResource(@NonNull T obj, PersistentResource parent, String id, @NonNull RequestScope scope) { this.obj = obj; this.uuid = Optional.ofNullable(id); this.lineage = parent != null ? new ResourceLineage(parent.lineage, parent) : new ResourceLineage(); this.dictionary = scope.getDictionary(); this.type = dictionary.getJsonAliasFor(obj.getClass()); this.transaction = scope.getTransaction(); this.requestScope = scope; dictionary.initializeEntity(obj); }
FilterExpression filterExpression; DataStoreTransaction tx = requestScope.getTransaction();
FilterExpression filterExpression; DataStoreTransaction tx = requestScope.getTransaction();
Preconditions.checkNotNull(requestScope); DataStoreTransaction tx = requestScope.getTransaction(); EntityDictionary dictionary = requestScope.getDictionary();
Preconditions.checkNotNull(requestScope); DataStoreTransaction tx = requestScope.getTransaction(); EntityDictionary dictionary = requestScope.getDictionary();
T obj = requestScope.getTransaction().createNewObject(entityClass);
T obj = requestScope.getTransaction().createNewObject(entityClass);