/** * Returns the system-configured sequence. To use some other sort * of datastore identifier (a GUID, string, or someting of that nature), * override {@link #getManagedType}, * {@link #getDataStoreIdType}, {@link #copyDataStoreId}, * {@link #newDataStoreId}. */ public Seq getDataStoreIdSequence(ClassMetaData forClass) { return ctx.getConfiguration().getSequenceInstance(); }
public FetchConfiguration setFetchBatchSize(int fetchBatchSize) { if (fetchBatchSize == DEFAULT && _state.ctx != null) fetchBatchSize = _state.ctx.getConfiguration().getFetchBatchSize(); if (fetchBatchSize != DEFAULT) _state.fetchBatchSize = fetchBatchSize; return this; }
public DetachedValueStateManager(PersistenceCapable pc, ClassMetaData meta, StoreContext ctx) { _pc = ImplHelper.toPersistenceCapable(pc, ctx.getConfiguration()); _meta = meta; _ctx = ctx; }
public DetachedValueStateManager(PersistenceCapable pc, ClassMetaData meta, StoreContext ctx) { _pc = ImplHelper.toPersistenceCapable(pc, ctx.getConfiguration()); _meta = meta; _ctx = ctx; }
/** * Returns the system-configured sequence. To use some other sort * of datastore identifier (a GUID, string, or someting of that nature), * override {@link #getManagedType}, * {@link #getDataStoreIdType}, {@link #copyDataStoreId}, * {@link #newDataStoreId}. */ public Seq getDataStoreIdSequence(ClassMetaData forClass) { return ctx.getConfiguration().getSequenceInstance(); }
public FetchConfiguration setFetchBatchSize(int fetchBatchSize) { if (fetchBatchSize == DEFAULT && _state.ctx != null) fetchBatchSize = _state.ctx.getConfiguration().getFetchBatchSize(); if (fetchBatchSize != DEFAULT) _state.fetchBatchSize = fetchBatchSize; return this; }
public FetchConfiguration setMaxFetchDepth(int depth) { if (depth == DEFAULT && _state.ctx != null) depth = _state.ctx.getConfiguration().getMaxFetchDepth(); if (depth != DEFAULT) { _state.maxFetchDepth = depth; if (_parent == null) _availableDepth = depth; } return this; }
public DetachedValueStateManager(PersistenceCapable pc, ClassMetaData meta, StoreContext ctx) { _pc = ImplHelper.toPersistenceCapable(pc, ctx.getConfiguration()); _meta = meta; _ctx = ctx; }
public FetchConfiguration setFetchBatchSize(int fetchBatchSize) { if (fetchBatchSize == DEFAULT && _state.ctx != null) fetchBatchSize = _state.ctx.getConfiguration().getFetchBatchSize(); if (fetchBatchSize != DEFAULT) _state.fetchBatchSize = fetchBatchSize; return this; }
public FetchConfiguration setMaxFetchDepth(int depth) { if (depth == DEFAULT && _state.ctx != null) depth = _state.ctx.getConfiguration().getMaxFetchDepth(); if (depth != DEFAULT) { _state.maxFetchDepth = depth; if (_parent == null) _availableDepth = depth; } return this; }
protected void open() { // cache operational state _conf = (XMLConfiguration) ctx.getConfiguration(); _store = _conf.getStore(); }
public FetchConfiguration setMaxFetchDepth(int depth) { if (depth == DEFAULT && _state.ctx != null) depth = _state.ctx.getConfiguration().getMaxFetchDepth(); if (depth != DEFAULT) { _state.maxFetchDepth = depth; if (_parent == null) _availableDepth = depth; } return this; }
public FetchConfiguration setFlushBeforeQueries(int flush) { if (flush == DEFAULT && _state.ctx != null) _state.flushQuery = _state.ctx.getConfiguration(). getFlushBeforeQueriesConstant(); else if (flush != DEFAULT) _state.flushQuery = flush; return this; }
public void setContext(StoreContext ctx) { _ctx = ctx; _mgr = ctx.getConfiguration().getDataCacheManagerInstance(); _gen = _mgr.getPCDataGenerator(); super.setContext(ctx); }
public FetchConfiguration resetFetchGroups() { String[] fetchGroupList = _state.ctx.getConfiguration().getFetchGroupsList(); clearFetchGroups((fetchGroupList == null || fetchGroupList.length == 0)); if (_state.ctx != null) addFetchGroups(Arrays.asList(fetchGroupList)); verifyDefaultPUFetchGroups(); return this; }
protected void provideField(Object toAttach, StateManagerImpl sm, int field) { sm.provideField(ImplHelper.toPersistenceCapable(toAttach, sm.getContext().getConfiguration()), this, field); }
public void setContext(StoreContext ctx) { _ctx = ctx; _gen = ctx.getConfiguration().getDataCacheManagerInstance(). getPCDataGenerator(); super.setContext(ctx); }
public FetchConfiguration resetFetchGroups() { String[] fetchGroupList = _state.ctx.getConfiguration().getFetchGroupsList(); clearFetchGroups((fetchGroupList == null || fetchGroupList.length == 0)); if (_state.ctx != null) addFetchGroups(Arrays.asList(fetchGroupList)); verifyDefaultPUFetchGroups(); return this; }
public StoreQuery newQuery(String language) { StoreQuery sq = newStoreQuery(language); if (sq == null || QueryLanguages.parserForLanguage(language) == null) { return sq; } QueryCache queryCache = _ctx.getConfiguration().getDataCacheManagerInstance().getSystemQueryCache(); if (queryCache == null) { return sq; } return new QueryCacheStoreQuery(sq, queryCache); }
public StoreQuery newQuery(String language) { StoreQuery q = super.newQuery(language); // if the query can't be parsed or it's using a non-parsed language // (one for which there is no ExpressionParser), we can't cache it. if (q == null || QueryLanguages.parserForLanguage(language) == null) return q; QueryCache queryCache = _ctx.getConfiguration(). getDataCacheManagerInstance().getSystemQueryCache(); if (queryCache == null) return q; return new QueryCacheStoreQuery(q, queryCache); }