Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-01-30 09:55:40 +0000
committerEike Stepper2011-01-30 09:55:40 +0000
commit511c8d2c25e09939d22178f0952c19321e35a211 (patch)
tree98df20c4925771c5dba899e30eab807267cfb750 /plugins/org.eclipse.emf.cdo.server.hibernate
parent941c35ba97dd412cb433780fbefa5519b3c8ecb8 (diff)
downloadcdo-511c8d2c25e09939d22178f0952c19321e35a211.tar.gz
cdo-511c8d2c25e09939d22178f0952c19321e35a211.tar.xz
cdo-511c8d2c25e09939d22178f0952c19321e35a211.zip
cdoID --> id
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.hibernate')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateQueryHandler.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateUtil.java50
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOIDPropertyGetter.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOInterceptor.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDORevisionInstantiator.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOSyntheticIdPropertyHandler.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/HibernateMoveableListWrapper.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/WrappedHibernateList.java4
8 files changed, 50 insertions, 50 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateQueryHandler.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateQueryHandler.java
index 62f846b271..85925a93c7 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateQueryHandler.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateQueryHandler.java
@@ -109,9 +109,9 @@ public class HibernateQueryHandler implements IQueryHandler
final Object param = info.getParameters().get(key);
if (param instanceof CDOID && HibernateUtil.getInstance().isStoreCreatedID((CDOID)param))
{
- final CDOID cdoID = (CDOID)param;
- final String entityName = HibernateUtil.getInstance().getEntityName(cdoID);
- final Serializable idValue = HibernateUtil.getInstance().getIdValue(cdoID);
+ final CDOID id = (CDOID)param;
+ final String entityName = HibernateUtil.getInstance().getEntityName(id);
+ final Serializable idValue = HibernateUtil.getInstance().getIdValue(id);
final CDORevision revision = (CDORevision)session.get(entityName, idValue);
query.setEntity(key, revision);
if (cacheResults)
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateUtil.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateUtil.java
index 706bef209a..2c30a33382 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateUtil.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/HibernateUtil.java
@@ -276,19 +276,19 @@ public class HibernateUtil
* Converts a CDOID to an unique String representations. Null, {@link CDOIDTemp} and null CDOID's are returned as null
* value. Supports {@link CDOID} and {@link CDOIDExternal}.
*
- * @param cdoID
- * the cdoID to convert
+ * @param id
+ * the id to convert
* @return a unique String
*/
- public String convertCDOIDToString(CDOID cdoID)
+ public String convertCDOIDToString(CDOID id)
{
- if (cdoID == null || cdoID.isNull() || cdoID.isTemporary())
+ if (id == null || id.isNull() || id.isTemporary())
{
return null;
}
final StringBuilder sb = new StringBuilder();
- CDOIDUtil.write(sb, cdoID);
+ CDOIDUtil.write(sb, id);
return sb.toString();
}
@@ -554,70 +554,70 @@ public class HibernateUtil
}
/**
- * Checks if the passed cdoID is created/used by this store.
+ * Checks if the passed id is created/used by this store.
*
- * @param cdoID
+ * @param id
* the {@link CDOID} to check
* @return true if this is a CDOID which is used/created by this store.
*/
- public boolean isStoreCreatedID(CDOID cdoID)
+ public boolean isStoreCreatedID(CDOID id)
{
// TODO: not the nicest check but we know that only these are supported
// by the hibernatestore
- return cdoID instanceof CDOClassifierRef.Provider || cdoID instanceof CDOIDExternal;
+ return id instanceof CDOClassifierRef.Provider || id instanceof CDOIDExternal;
}
/**
* Checks if the passed {@link CDOID} is a type supported by this store.
*
- * @param cdoID
+ * @param id
* the CDOID instance to check
* @throws IllegalArgumentException
* if the passed type is not supported.
*/
- public void checkIsSupportedID(CDOID cdoID)
+ public void checkIsSupportedID(CDOID id)
{
- if (!isStoreCreatedID(cdoID))
+ if (!isStoreCreatedID(id))
{
- throw new IllegalArgumentException("This CDOID type " + cdoID + " is not supported by this store. " //$NON-NLS-1$ //$NON-NLS-2$
- + cdoID.getClass().getName());
+ throw new IllegalArgumentException("This CDOID type " + id + " is not supported by this store. " //$NON-NLS-1$ //$NON-NLS-2$
+ + id.getClass().getName());
}
}
/**
- * @param cdoID
+ * @param id
* CDOID to get the internal id from
* @return the id used by Hibernate, the String or Long value in the CDOID object.
*/
- public Serializable getIdValue(CDOID cdoID)
+ public Serializable getIdValue(CDOID id)
{
- if (cdoID instanceof AbstractCDOIDString)
+ if (id instanceof AbstractCDOIDString)
{
- return ((AbstractCDOIDString)cdoID).getStringValue();
+ return ((AbstractCDOIDString)id).getStringValue();
}
- if (cdoID instanceof AbstractCDOIDLong)
+ if (id instanceof AbstractCDOIDLong)
{
- return ((AbstractCDOIDLong)cdoID).getLongValue();
+ return ((AbstractCDOIDLong)id).getLongValue();
}
- throw new IllegalArgumentException("This CDOID type " + cdoID + " is not supported by this store."); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new IllegalArgumentException("This CDOID type " + id + " is not supported by this store."); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* Retrieves the entity name for the EClass present in the CDOID.
*
- * @param cdoID
+ * @param id
* the {@link CDOID} to get the EClass from
* @return the entity name for the EClass of the CDOID.
* @see HibernateStore#getEntityName(EClass)
*/
- public String getEntityName(CDOID cdoID)
+ public String getEntityName(CDOID id)
{
- final CDOClassifierRef classifierRef = CDOIDUtil.getClassifierRef(cdoID);
+ final CDOClassifierRef classifierRef = CDOIDUtil.getClassifierRef(id);
if (classifierRef == null)
{
- throw new IllegalArgumentException("This CDOID type of " + cdoID + " is not supported by this store."); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new IllegalArgumentException("This CDOID type of " + id + " is not supported by this store."); //$NON-NLS-1$ //$NON-NLS-2$
}
final HibernateStoreAccessor accessor = HibernateThreadContext.getCurrentStoreAccessor();
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOIDPropertyGetter.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOIDPropertyGetter.java
index 35db1d35e0..ec773920da 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOIDPropertyGetter.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOIDPropertyGetter.java
@@ -65,9 +65,9 @@ public class CDOIDPropertyGetter extends CDOPropertyGetter
setCDOID(revision, id);
// TODO: does this make sense?
- // if (cdoID.getId() == null)
+ // if (id.getId() == null)
// {
- // cdoID.setId((Serializable)id);
+ // id.setId((Serializable)id);
// }
return id;
}
@@ -75,18 +75,18 @@ public class CDOIDPropertyGetter extends CDOPropertyGetter
private void setCDOID(CDORevision target, Object value)
{
final InternalCDORevision revision = (InternalCDORevision)target;
- final CDOID cdoID = HibernateUtil.getInstance().getCDOID(revision);
- if (cdoID == null || cdoID instanceof CDOIDTemp)
+ final CDOID id = HibernateUtil.getInstance().getCDOID(revision);
+ if (id == null || id instanceof CDOIDTemp)
{
final CDOID newCDOID = HibernateUtil.getInstance().createCDOID(new CDOClassifierRef(revision.getEClass()), value);
revision.setID(newCDOID);
if (HibernateThreadContext.isCommitContextSet())
{
final HibernateCommitContext commitContext = HibernateThreadContext.getCommitContext();
- commitContext.setNewID(cdoID, newCDOID);
- if (cdoID instanceof CDOIDTemp)
+ commitContext.setNewID(id, newCDOID);
+ if (id instanceof CDOIDTemp)
{
- commitContext.getCommitContext().addIDMapping(cdoID, newCDOID);
+ commitContext.getCommitContext().addIDMapping(id, newCDOID);
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOInterceptor.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOInterceptor.java
index e548a39d40..d8259ce256 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOInterceptor.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOInterceptor.java
@@ -42,8 +42,8 @@ public class CDOInterceptor extends EmptyInterceptor
}
final CDORevision revision = (CDORevision)entity;
- final CDOID cdoID = HibernateUtil.getInstance().getCDOID(revision);
- if (cdoID.isNull() || cdoID.isTemporary())
+ final CDOID id = HibernateUtil.getInstance().getCDOID(revision);
+ if (id.isNull() || id.isTemporary())
{
return true;
}
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDORevisionInstantiator.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDORevisionInstantiator.java
index 8a1daecb57..537d07784d 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDORevisionInstantiator.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDORevisionInstantiator.java
@@ -48,12 +48,12 @@ public class CDORevisionInstantiator implements Instantiator
return instantiate(null);
}
- public Object instantiate(Serializable id)
+ public Object instantiate(Serializable key)
{
final HibernateStoreAccessor storeAccessor = HibernateThreadContext.getCurrentStoreAccessor();
HibernateStore store = storeAccessor.getStore();
- final CDOID cdoID = HibernateUtil.getInstance().createCDOID(classifierRef, id);
- final InternalCDORevision revision = store.createRevision(eClass, cdoID);
+ final CDOID id = HibernateUtil.getInstance().createCDOID(classifierRef, key);
+ final InternalCDORevision revision = store.createRevision(eClass, id);
revision.setBranchPoint(storeAccessor.getStore().getMainBranchHead());
return revision;
}
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOSyntheticIdPropertyHandler.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOSyntheticIdPropertyHandler.java
index aea485de95..a94b2ebd0f 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOSyntheticIdPropertyHandler.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/CDOSyntheticIdPropertyHandler.java
@@ -98,24 +98,24 @@ public class CDOSyntheticIdPropertyHandler implements Getter, Setter, PropertyAc
}
final InternalCDORevision revision = HibernateUtil.getInstance().getCDORevision(target);
- final CDOID cdoID = HibernateUtil.getInstance().getCDOID(revision);
- if (cdoID == null || cdoID instanceof CDOIDTemp)
+ final CDOID id = HibernateUtil.getInstance().getCDOID(revision);
+ if (id == null || id instanceof CDOIDTemp)
{
final CDOID newCDOID = HibernateUtil.getInstance().createCDOID(new CDOClassifierRef(revision.getEClass()), value);
revision.setID(newCDOID);
if (HibernateThreadContext.isCommitContextSet())
{
final HibernateCommitContext commitContext = HibernateThreadContext.getCommitContext();
- commitContext.setNewID(cdoID, newCDOID);
- if (cdoID instanceof CDOIDTemp)
+ commitContext.setNewID(id, newCDOID);
+ if (id instanceof CDOIDTemp)
{
- commitContext.getCommitContext().addIDMapping(cdoID, newCDOID);
+ commitContext.getCommitContext().addIDMapping(id, newCDOID);
}
}
}
else
{
- final Serializable idValue = HibernateUtil.getInstance().getIdValue(cdoID);
+ final Serializable idValue = HibernateUtil.getInstance().getIdValue(id);
if (!idValue.equals(value))
{
throw new IllegalStateException("Current id and new id are different " + value + "/" + idValue); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/HibernateMoveableListWrapper.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/HibernateMoveableListWrapper.java
index d8e5e48b0e..f9d6ac9df1 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/HibernateMoveableListWrapper.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/HibernateMoveableListWrapper.java
@@ -130,10 +130,10 @@ public class HibernateMoveableListWrapper implements MoveableList<Object>
return HibernateUtil.getInstance().getCDORevision((CDOID)o);
}
- protected List<Object> getObjects(List<?> cdoIDs)
+ protected List<Object> getObjects(List<?> ids)
{
List<Object> result = new ArrayList<Object>();
- for (Object o : cdoIDs)
+ for (Object o : ids)
{
result.add(getObject(o));
}
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/WrappedHibernateList.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/WrappedHibernateList.java
index a116448916..389ddece8d 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/WrappedHibernateList.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/WrappedHibernateList.java
@@ -169,10 +169,10 @@ public class WrappedHibernateList implements InternalCDOList
return HibernateUtil.getInstance().getCDORevision((CDOID)o);
}
- protected List<Object> getObjects(List<?> cdoIDs)
+ protected List<Object> getObjects(List<?> ids)
{
List<Object> result = new ArrayList<Object>();
- for (Object o : cdoIDs)
+ for (Object o : ids)
{
result.add(getObject(o));
}

Back to the top