diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java | 108 |
1 files changed, 0 insertions, 108 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java deleted file mode 100644 index 976ba93809..0000000000 --- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/jpa2/context/orm/GenericOrmCacheable2_0.java +++ /dev/null @@ -1,108 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009, 2011 Oracle. All rights reserved. - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0, which accompanies this distribution - * and is available at http://www.eclipse.org/legal/epl-v10.html. - * - * Contributors: - * Oracle - initial API and implementation - ******************************************************************************/ -package org.eclipse.jpt.jpa.core.internal.jpa2.context.orm; - -import org.eclipse.jpt.common.core.utility.TextRange; -import org.eclipse.jpt.jpa.core.internal.context.orm.AbstractOrmXmlContextNode; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCacheable2_0; -import org.eclipse.jpt.jpa.core.jpa2.context.orm.OrmCacheableHolder2_0; -import org.eclipse.jpt.jpa.core.resource.orm.v2_0.XmlCacheable_2_0; - -/** - * <code>orm.xml</code> cacheable - */ -public class GenericOrmCacheable2_0 - extends AbstractOrmXmlContextNode - implements OrmCacheable2_0 -{ - protected Boolean specifiedCacheable; - protected boolean defaultCacheable; - - - public GenericOrmCacheable2_0(OrmCacheableHolder2_0 parent) { - super(parent); - this.specifiedCacheable = this.getXmlCacheable().getCacheable(); - } - - - // ********** synchronize/update ********** - - @Override - public void synchronizeWithResourceModel() { - super.synchronizeWithResourceModel(); - this.setSpecifiedCacheable_(this.getXmlCacheable().getCacheable()); - } - - @Override - public void update() { - super.update(); - this.setDefaultCacheable(this.buildDefaultCacheable()); - } - - - // ********** cacheable ********** - - public boolean isCacheable() { - return (this.specifiedCacheable != null) ? this.specifiedCacheable.booleanValue() : this.defaultCacheable; - } - - public Boolean getSpecifiedCacheable() { - return this.specifiedCacheable; - } - - public void setSpecifiedCacheable(Boolean cacheable) { - this.setSpecifiedCacheable_(cacheable); - this.getXmlCacheable().setCacheable(cacheable); - } - - protected void setSpecifiedCacheable_(Boolean cacheable) { - Boolean old = this.specifiedCacheable; - this.specifiedCacheable = cacheable; - this.firePropertyChanged(SPECIFIED_CACHEABLE_PROPERTY, old, cacheable); - } - - public boolean isDefaultCacheable() { - return this.defaultCacheable; - } - - protected void setDefaultCacheable(boolean cacheable) { - boolean old = this.defaultCacheable; - this.defaultCacheable = cacheable; - this.firePropertyChanged(DEFAULT_CACHEABLE_PROPERTY, old, cacheable); - } - - protected boolean buildDefaultCacheable() { - return this.getCacheableHolder().calculateDefaultCacheable(); - } - - - // ********** misc ********** - - @Override - public OrmCacheableHolder2_0 getParent() { - return (OrmCacheableHolder2_0) super.getParent(); - } - - protected OrmCacheableHolder2_0 getCacheableHolder() { - return this.getParent(); - } - - protected XmlCacheable_2_0 getXmlCacheable() { - return this.getCacheableHolder().getXmlCacheable(); - } - - - // ********** validation ********** - - public TextRange getValidationTextRange() { - TextRange textRange = this.getXmlCacheable().getCacheableTextRange(); - return (textRange != null) ? textRange : this.getCacheableHolder().getValidationTextRange(); - } -} |