summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-04-02 05:24:00 (EDT)
committerEike Stepper2006-04-02 05:24:00 (EDT)
commit2b0587c8d86dcf22ce618a738991269c985c631f (patch)
tree631ba8d421f8e387434f9b7b01ca9bc25f0be855
parentd9d4f88a0aea4c307940262524cb3bb08c576839 (diff)
downloadcdo-2b0587c8d86dcf22ce618a738991269c985c631f.zip
cdo-2b0587c8d86dcf22ce618a738991269c985c631f.tar.gz
cdo-2b0587c8d86dcf22ce618a738991269c985c631f.tar.bz2
Fixed case of various acronyms.
-rw-r--r--plugins/org.eclipse.emf.cdo.examples.server/META-INF/server.xml10
-rw-r--r--plugins/org.eclipse.emf.cdo.server/plugin.properties2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ClassInfo.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/Mapper.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ResourceInfo.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ResourceManager.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ServerCDOProtocol.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ClassInfoImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java86
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceInfoImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/AnnouncePackageIndication.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java46
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcePathIndication.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOProtocolImpl.java4
-rw-r--r--plugins/org.eclipse.net4j.util/copyright.txt8
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/Assert.java43
19 files changed, 107 insertions, 142 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.server/META-INF/server.xml b/plugins/org.eclipse.emf.cdo.examples.server/META-INF/server.xml
index 37fe0ca..79ac97d 100644
--- a/plugins/org.eclipse.emf.cdo.examples.server/META-INF/server.xml
+++ b/plugins/org.eclipse.emf.cdo.examples.server/META-INF/server.xml
@@ -54,7 +54,7 @@
<bean id="columnConverter" class="org.eclipse.emf.cdo.server.impl.ColumnConverterImpl"/>
<!-- ######################################################## -->
- <bean id="cdoServerProtocol" class="org.eclipse.emf.cdo.server.protocol.ServerCDOProtocolImpl">
+ <bean id="serverCDOProtocol" class="org.eclipse.emf.cdo.server.protocol.ServerCDOProtocolImpl">
<property name="protocolManager">
<ref bean="protocolManager"/>
</property>
@@ -64,13 +64,13 @@
<property name="mapper">
<ref local="mapper"/>
</property>
- <property name="cdoResServerProtocol">
- <ref local="cdoResServerProtocol"/>
+ <property name="serverCDOResProtocol">
+ <ref local="serverCDOResProtocol"/>
</property>
</bean>
<!-- ######################################################## -->
- <bean id="cdoResServerProtocol"
+ <bean id="serverCDOResProtocol"
class="org.eclipse.emf.cdo.server.protocol.ServerCDOResProtocolImpl">
<property name="protocolManager">
<ref bean="protocolManager"/>
@@ -139,7 +139,7 @@
<property name="jdbcTemplate">
<ref local="jdbcTemplate"/>
</property>
- <property name="oidEncoder">
+ <property name="oidEncoder" >
<ref bean="oidEncoder"/>
</property>
<property name="sqlDialectName">
diff --git a/plugins/org.eclipse.emf.cdo.server/plugin.properties b/plugins/org.eclipse.emf.cdo.server/plugin.properties
index e6fd2cb..1465c22 100644
--- a/plugins/org.eclipse.emf.cdo.server/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.server/plugin.properties
@@ -1,2 +1,2 @@
-pluginName = Net4j CDO Server
+pluginName = CDO Server Support
providerName = Eclipse.org
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ClassInfo.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ClassInfo.java
index b94d6cc..c39160d 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ClassInfo.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ClassInfo.java
@@ -13,7 +13,7 @@ package org.eclipse.emf.cdo.server;
public interface ClassInfo
{
- public int getCid();
+ public int getCID();
public String getName();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/Mapper.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/Mapper.java
index 5248352..3610dfa 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/Mapper.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/Mapper.java
@@ -21,11 +21,11 @@ public interface Mapper extends Service
{
public int getNextPid();
- public int getNextCid();
+ public int getNextCID();
- public int getNextRid();
+ public int getNextRID();
- public long getNextOid(int rid);
+ public long getNextOID(int rid);
public void sql(String sql);
@@ -77,7 +77,7 @@ public interface Mapper extends Service
public void insertResource(int rid, String path);
- public OIDEncoder getOidEncoder();
+ public OIDEncoder getOidEncoder(); // Don't change case! Spring will be irritated
public PackageManager getPackageManager();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ResourceInfo.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ResourceInfo.java
index 7714efd..bbd9fda 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ResourceInfo.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ResourceInfo.java
@@ -17,5 +17,5 @@ public interface ResourceInfo
public String getPath();
- public int getRid();
+ public int getRID();
} \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ResourceManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ResourceManager.java
index 073587d..17929e0 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ResourceManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ResourceManager.java
@@ -18,7 +18,7 @@ public interface ResourceManager extends Service
{
public void registerResourceInfo(ResourceInfo resourceInfo);
- public ResourceInfo registerResourceInfo(String resourcePath, int rid, long nextOidFragment);
+ public ResourceInfo registerResourceInfo(String resourcePath, int rid, long nextOIDFragment);
public ResourceInfo getResourceInfo(int rid, Mapper mapper);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ServerCDOProtocol.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ServerCDOProtocol.java
index da7fbc7..28a6071 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ServerCDOProtocol.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/ServerCDOProtocol.java
@@ -22,5 +22,5 @@ public interface ServerCDOProtocol extends CDOProtocol
public TransactionTemplate getTransactionTemplate();
- public ServerCDOResProtocol getCdoResServerProtocol();
+ public ServerCDOResProtocol getServerCDOResProtocol();
} \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ClassInfoImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ClassInfoImpl.java
index 2a382d4..87ea5e8 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ClassInfoImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ClassInfoImpl.java
@@ -49,7 +49,7 @@ public class ClassInfoImpl implements ClassInfo
this.packageInfo = packageInfo;
}
- public int getCid()
+ public int getCID()
{
return cid;
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
index 49c7a32..1c3d5e5 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/MapperImpl.java
@@ -69,13 +69,13 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
protected String sqlDialectName;
- protected OIDEncoder oIDEncoder;
+ protected OIDEncoder oidEncoder;
private int nextPid;
- private int nextRid;
+ private int nextRID;
- private int nextCid;
+ private int nextCID;
private transient SQLDialect cachedSqlDialect;
@@ -163,19 +163,19 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
}
/**
- * @return Returns the oIDEncoder.
+ * @return Returns the oidEncoder.
*/
- public OIDEncoder getOidEncoder()
+ public OIDEncoder getOidEncoder() // Don't change case! Spring will be irritated
{
- return oIDEncoder;
+ return oidEncoder;
}
/**
- * @param oIDEncoder The oIDEncoder to set.
+ * @param oidEncoder The oidEncoder to set.
*/
- public void setOidEncoder(OIDEncoder oIDEncoder)
+ public void setOidEncoder(OIDEncoder oidEncoder) // Don't change case! Spring will be irritated
{
- doSet("oIDEncoder", oIDEncoder);
+ doSet("oidEncoder", oidEncoder);
}
/**
@@ -199,23 +199,23 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
return nextPid++;
}
- public int getNextCid()
+ public int getNextCID()
{
- return nextCid++;
+ return nextCID++;
}
- public int getNextRid()
+ public int getNextRID()
{
- return nextRid++;
+ return nextRID++;
}
- public long getNextOid(int rid)
+ public long getNextOID(int rid)
{
ResourceInfo resourceInfo = resourceManager.getResourceInfo(rid, this);
if (resourceInfo == null) throw new ResourceNotFoundException("Unknown RID: " + rid);
- long nextOidFragment = resourceInfo.getNextOIDFragment();
- return oIDEncoder.getOID(rid, nextOidFragment);
+ long nextOIDFragment = resourceInfo.getNextOIDFragment();
+ return oidEncoder.getOID(rid, nextOIDFragment);
}
protected void validate() throws ValidationException
@@ -225,15 +225,15 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
assertNotNull("packageManager");
assertNotNull("resourceManager");
assertNotNull("dataSource");
- assertNotNull("oIDEncoder");
+ assertNotNull("oidEncoder");
assertNotNull("jdbcTemplate");
initTables();
initPackages();
nextPid = selectMaxPid() + 1;
- nextCid = selectMaxCid() + 1;
- nextRid = selectMaxRid() + 1;
+ nextCID = selectMaxCID() + 1;
+ nextRID = selectMaxRID() + 1;
}
protected void initTables()
@@ -348,14 +348,14 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
ClassInfo classInfo = packageInfo.addClass(cid, name, parentName, tableName);
initAttributes(classInfo);
- if (cid > nextCid)
+ if (cid > nextCID)
{
- nextCid = cid;
+ nextCID = cid;
}
}
});
- ++nextCid;
+ ++nextCID;
}
protected void initAttributes(final ClassInfo classInfo)
@@ -363,7 +363,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
// Important to create a new template instance to handle nested select
JdbcTemplate nestedTemplate = new JdbcTemplate(dataSource);
- Object[] args = { new Integer(classInfo.getCid())};
+ Object[] args = { new Integer(classInfo.getCID())};
if (isDebugEnabled()) debug(StringHelper.replaceWildcards(SELECT_ATTRIBUTES, "?", args));
nestedTemplate.query(SELECT_ATTRIBUTES, args, new RowCallbackHandler()
@@ -391,7 +391,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
public void insertClass(final ClassInfo classInfo)
{
- sql(INSERT_CLASS, new Object[] { new Integer(classInfo.getCid()), classInfo.getName(),
+ sql(INSERT_CLASS, new Object[] { new Integer(classInfo.getCID()), classInfo.getName(),
classInfo.getParentName(), classInfo.getTableName(),
new Integer(classInfo.getPackageInfo().getPid())});
}
@@ -417,7 +417,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
{
public void processRow(ResultSet resultSet) throws SQLException
{
- result.setRid(resultSet.getInt(1));
+ result.setRID(resultSet.getInt(1));
++rows[0];
}
});
@@ -427,8 +427,8 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
return null;
}
- long nextOidFragment = selectMaxOidFragment(result.getRid()) + 1;
- result.setNextOIDFragment(nextOidFragment);
+ long nextOIDFragment = selectMaxOIDFragment(result.getRID()) + 1;
+ result.setNextOIDFragment(nextOIDFragment);
if (isDebugEnabled()) debug("Selected " + result);
return result;
@@ -441,7 +441,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
final int[] rows = new int[1];
final ResourceInfoImpl result = new ResourceInfoImpl();
- result.setRid(rid);
+ result.setRID(rid);
jdbcTemplate.query(SELECT_PATH_OF_RESOURCE, args, new RowCallbackHandler()
{
@@ -457,14 +457,14 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
return null;
}
- long nextOidFragment = selectMaxOidFragment(result.getRid()) + 1;
- result.setNextOIDFragment(nextOidFragment);
+ long nextOIDFragment = selectMaxOIDFragment(result.getRID()) + 1;
+ result.setNextOIDFragment(nextOIDFragment);
if (isDebugEnabled()) debug("Selected " + result);
return result;
}
- protected int selectMaxOidFragment(int rid)
+ protected int selectMaxOIDFragment(int rid)
{
Object[] args = ridBounds(rid);
if (isDebugEnabled()) debug(StringHelper.replaceWildcards(SELECT_MAX_OID_FRAGMENT, "?", args));
@@ -474,8 +474,8 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
private Object[] ridBounds(int rid)
{
- long lowerBound = oIDEncoder.getOID(rid, 1);
- long upperBound = oIDEncoder.getOID(rid + 1, 1) - 1;
+ long lowerBound = oidEncoder.getOID(rid, 1);
+ long upperBound = oidEncoder.getOID(rid + 1, 1) - 1;
return new Object[] { new Long(lowerBound), new Long(upperBound)};
}
@@ -485,13 +485,13 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
return jdbcTemplate.queryForInt(SELECT_MAX_PID);
}
- private int selectMaxCid()
+ private int selectMaxCID()
{
if (isDebugEnabled()) debug(SELECT_MAX_CID);
return jdbcTemplate.queryForInt(SELECT_MAX_CID);
}
- private int selectMaxRid()
+ private int selectMaxRID()
{
if (isDebugEnabled()) debug(SELECT_MAX_RID);
return jdbcTemplate.queryForInt(SELECT_MAX_RID);
@@ -499,7 +499,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
public ResourceInfo createResource(String resourcePath)
{
- int rid = getNextRid();
+ int rid = getNextRID();
sql(INSERT_RESOURCE, new Object[] { new Integer(rid), resourcePath});
return resourceManager.registerResourceInfo(resourcePath, rid, 1);
}
@@ -571,7 +571,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
{
removeReferences(oid); // TODO optimize for objects with no refs
- int cid = selectCidOfObject(oid);
+ int cid = selectCIDOfObject(oid);
ClassInfo classInfo = packageManager.getClassInfo(cid);
while (classInfo != null)
@@ -583,7 +583,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
removeSegment(oid, OBJECT_TABLE);
}
- protected int selectCidOfObject(long oid)
+ protected int selectCIDOfObject(long oid)
{
Object[] args = { new Long(oid)};
if (isDebugEnabled()) debug(StringHelper.replaceWildcards(SELECT_CID_OF_OBJECT, "?", args));
@@ -648,7 +648,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
{
if (resourceInfo != null)
{
- Object[] args = ridBounds(resourceInfo.getRid());
+ Object[] args = ridBounds(resourceInfo.getRID());
if (isDebugEnabled()) debug(StringHelper.replaceWildcards(TRANSMIT_CONTENT, "?", args));
jdbcTemplate.query(TRANSMIT_CONTENT, args, new RowCallbackHandler()
@@ -660,7 +660,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
int cid = resultSet.getInt(3);
if (isDebugEnabled())
- debug("Object: oid=" + oIDEncoder.toString(oid) + ", oca=" + oca + ", cid=" + cid);
+ debug("Object: oid=" + oidEncoder.toString(oid) + ", oca=" + oca + ", cid=" + cid);
channel.transmitLong(oid);
channel.transmitInt(oca);
@@ -691,7 +691,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
int cid = resultSet.getInt(2);
if (isDebugEnabled())
- debug("Object: oid=" + oIDEncoder.toString(oid) + ", oca=" + oca + ", cid=" + cid);
+ debug("Object: oid=" + oidEncoder.toString(oid) + ", oca=" + oca + ", cid=" + cid);
channel.transmitLong(oid);
channel.transmitInt(oca);
@@ -753,7 +753,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
{
Container container = (Container) it.next();
if (isDebugEnabled())
- debug("Container: oid=" + oIDEncoder.toString(container.oid) + ", cid=" + container.cid);
+ debug("Container: oid=" + oidEncoder.toString(container.oid) + ", cid=" + container.cid);
channel.transmitLong(container.oid);
channel.transmitInt(container.cid);
@@ -773,7 +773,7 @@ public class MapperImpl extends ServiceImpl implements Mapper, SQLConstants
int cid = resultSet.getInt(3);
if (isDebugEnabled())
- debug("Reference: feature=" + feature + ", target=" + oIDEncoder.toString(target)
+ debug("Reference: feature=" + feature + ", target=" + oidEncoder.toString(target)
+ ", cid=" + cid);
channel.transmitInt(feature);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java
index 04d1422..4caf5cf 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java
@@ -60,7 +60,7 @@ public class PackageManagerImpl extends ServiceImpl implements PackageManager
public void registerClassInfo(ClassInfo classInfo)
{
- cidToClassInfoMap.put(new Integer(classInfo.getCid()), classInfo);
+ cidToClassInfoMap.put(new Integer(classInfo.getCID()), classInfo);
nameToClassInfoMap.put(classInfo.getName(), classInfo);
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceInfoImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceInfoImpl.java
index f0ad428..ae2a2c1 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceInfoImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceInfoImpl.java
@@ -43,12 +43,12 @@ public class ResourceInfoImpl implements ResourceInfo
this.path = path;
}
- public int getRid()
+ public int getRID()
{
return rid;
}
- public void setRid(int rid)
+ public void setRID(int rid)
{
this.rid = rid;
}
@@ -66,7 +66,7 @@ public class ResourceInfoImpl implements ResourceInfo
@Override
public String toString()
{
- return "ResourceInfo(rid=" + rid + ", path=" + path + ", nextOidFragment=" + nextOIDFragment
+ return "ResourceInfo(rid=" + rid + ", path=" + path + ", nextOIDFragment=" + nextOIDFragment
+ ")";
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java
index 6783d56..2ea38ab 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ResourceManagerImpl.java
@@ -30,13 +30,13 @@ public class ResourceManagerImpl extends ServiceImpl implements ResourceManager
public void registerResourceInfo(ResourceInfo resourceInfo)
{
if (isDebugEnabled()) debug("Registering " + resourceInfo);
- ridToResourceMap.put(resourceInfo.getRid(), resourceInfo);
+ ridToResourceMap.put(resourceInfo.getRID(), resourceInfo);
pathToResourceMap.put(resourceInfo.getPath(), resourceInfo);
}
- public ResourceInfo registerResourceInfo(String resourcePath, int rid, long nextOidFragment)
+ public ResourceInfo registerResourceInfo(String resourcePath, int rid, long nextOIDFragment)
{
- ResourceInfo resourceInfo = new ResourceInfoImpl(resourcePath, rid, nextOidFragment);
+ ResourceInfo resourceInfo = new ResourceInfoImpl(resourcePath, rid, nextOIDFragment);
registerResourceInfo(resourceInfo);
return resourceInfo;
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/AnnouncePackageIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/AnnouncePackageIndication.java
index 19c1cc7..f890b8a 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/AnnouncePackageIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/AnnouncePackageIndication.java
@@ -54,9 +54,9 @@ public class AnnouncePackageIndication extends AbstractIndicationWithResponse
{
ClassInfo classInfo = classInfos[i];
if (isDebugEnabled())
- debug("Responding class " + classInfo.getName() + " = " + classInfo.getCid());
+ debug("Responding class " + classInfo.getName() + " = " + classInfo.getCID());
- transmitInt(classInfo.getCid());
+ transmitInt(classInfo.getCID());
transmitString(classInfo.getName());
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
index 818b78f..0421b51 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
@@ -48,7 +48,7 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
private List changedObjectIds = new ArrayList();
- private Map changedObjectOidOca = new HashMap();
+ private Map changedObjectOIDOCA = new HashMap();
private List oidList = new ArrayList();
@@ -117,7 +117,7 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
Long id = (Long) iter.next();
transmitLong(id.longValue());
- Integer oca = (Integer) changedObjectOidOca.get(id);
+ Integer oca = (Integer) changedObjectOIDOCA.get(id);
transmitInt(oca.intValue());
}
}
@@ -165,7 +165,7 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
}
ClassInfo info = receiveClassInfo();
- getMapper().insertObject(oid, info.getCid());
+ getMapper().insertObject(oid, info.getCID());
boolean isContent = receiveBoolean();
if (isContent)
@@ -224,20 +224,20 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
*/
private long registerTempOID(long tempOID)
{
- OIDEncoder oIDEncoder = getMapper().getOidEncoder();
- int rid = oIDEncoder.getRID(-tempOID);
+ OIDEncoder oidEncoder = getMapper().getOidEncoder();
+ int rid = oidEncoder.getRID(-tempOID);
ResourceInfo resourceInfo = getMapper().getResourceManager().getResourceInfo(rid, getMapper());
long oidFragment = resourceInfo.getNextOIDFragment();
Long key = new Long(tempOID);
- long oid = oIDEncoder.getOID(rid, oidFragment);
+ long oid = oidEncoder.getOID(rid, oidFragment);
Long val = new Long(oid);
tempOIDs.put(key, val);
oidList.add(val);
if (isDebugEnabled())
- debug("Mapping oid " + oIDEncoder.toString(key) + " --> " + oIDEncoder.toString(val));
+ debug("Mapping oid " + oidEncoder.toString(key) + " --> " + oidEncoder.toString(val));
return oid;
}
@@ -251,8 +251,8 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
if (sourceVal == null)
{
- OIDEncoder oIDEncoder = getMapper().getOidEncoder();
- throw new ImplementationError("no mapping for temporary oid " + oIDEncoder.toString(tempOID));
+ OIDEncoder oidEncoder = getMapper().getOidEncoder();
+ throw new ImplementationError("no mapping for temporary oid " + oidEncoder.toString(tempOID));
}
return sourceVal.longValue();
@@ -336,9 +336,9 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
if (isDebugEnabled())
{
- OIDEncoder oIDEncoder = getMapper().getOidEncoder();
- debug("received reference set: oid=" + oIDEncoder.toString(oid) + ", feature=" + feature
- + ", target=" + oIDEncoder.toString(target) + ", content=" + content);
+ OIDEncoder oidEncoder = getMapper().getOidEncoder();
+ debug("received reference set: oid=" + oidEncoder.toString(oid) + ", feature=" + feature
+ + ", target=" + oidEncoder.toString(target) + ", content=" + content);
}
getMapper().insertReference(oid, feature, 0, target, content);
@@ -355,8 +355,8 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
if (isDebugEnabled())
{
- OIDEncoder oIDEncoder = getMapper().getOidEncoder();
- debug("received reference unset: oid=" + oIDEncoder.toString(oid) + ", feature=" + feature);
+ OIDEncoder oidEncoder = getMapper().getOidEncoder();
+ debug("received reference unset: oid=" + oidEncoder.toString(oid) + ", feature=" + feature);
}
getMapper().removeReference(oid, feature, 0);
@@ -381,9 +381,9 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
if (isDebugEnabled())
{
- OIDEncoder oIDEncoder = getMapper().getOidEncoder();
- debug("received reference add: oid=" + oIDEncoder.toString(oid) + ", feature=" + feature
- + ", ordinal=" + ordinal + ", target=" + oIDEncoder.toString(target) + ", content="
+ OIDEncoder oidEncoder = getMapper().getOidEncoder();
+ debug("received reference add: oid=" + oidEncoder.toString(oid) + ", feature=" + feature
+ + ", ordinal=" + ordinal + ", target=" + oidEncoder.toString(target) + ", content="
+ content);
}
@@ -408,8 +408,8 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
if (isDebugEnabled())
{
- OIDEncoder oIDEncoder = getMapper().getOidEncoder();
- debug("receiveObjectChangesReferences(REMOVE, sourceId=" + oIDEncoder.toString(oid)
+ OIDEncoder oidEncoder = getMapper().getOidEncoder();
+ debug("receiveObjectChangesReferences(REMOVE, sourceId=" + oidEncoder.toString(oid)
+ ", featureId=" + feature + ", sourceOrdinal=" + ordinal + ")");
}
@@ -430,8 +430,8 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
if (isDebugEnabled())
{
- OIDEncoder oIDEncoder = getMapper().getOidEncoder();
- debug("received reference move: oid=" + oIDEncoder.toString(oid) + ", feature=" + feature
+ OIDEncoder oidEncoder = getMapper().getOidEncoder();
+ debug("received reference move: oid=" + oidEncoder.toString(oid) + ", feature=" + feature
+ ", ordinal=" + ordinal + ", moveToIndex=" + moveToIndex);
}
@@ -487,7 +487,7 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
{
Long key = new Long(oid);
changedObjectIds.add(key);
- changedObjectOidOca.put(key, new Integer(oca));
+ changedObjectOIDOCA.put(key, new Integer(oca));
}
/**
@@ -618,7 +618,7 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
Channel me = getChannel();
int myType = me.getConnector().getType();
ServerCDOProtocol cdo = (ServerCDOProtocol) me.getProtocol();
- ServerCDOResProtocol cdores = cdo.getCdoResServerProtocol();
+ ServerCDOResProtocol cdores = cdo.getServerCDOResProtocol();
Channel[] channels = cdores.getChannels();
for (int i = 0; i < channels.length; i++)
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java
index ac18f48..1aa0533 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java
@@ -55,9 +55,9 @@ public class DescribePackageIndication extends AbstractIndicationWithResponse
{
ClassInfo classInfo = (ClassInfo) iter.next();
if (isDebugEnabled())
- debug("Responding class " + classInfo.getName() + " = " + classInfo.getCid());
+ debug("Responding class " + classInfo.getName() + " = " + classInfo.getCID());
- transmitInt(classInfo.getCid());
+ transmitInt(classInfo.getCID());
transmitString(classInfo.getName());
}
}
@@ -69,7 +69,7 @@ public class DescribePackageIndication extends AbstractIndicationWithResponse
for (int i = 0; i < count; i++)
{
- int cid = getMapper().getNextCid();
+ int cid = getMapper().getNextCID();
String name = receiveString();
String parentName = receiveString();
String tableName = receiveString();
@@ -99,7 +99,7 @@ public class DescribePackageIndication extends AbstractIndicationWithResponse
AttributeInfo attributeInfo = classInfo.addAttribute(name, featureId, dataType, columnName,
columnType);
- getMapper().insertAttribute(attributeInfo, classInfo.getCid());
+ getMapper().insertAttribute(attributeInfo, classInfo.getCID());
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcePathIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcePathIndication.java
index 28260b7..656a04a 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcePathIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ResourcePathIndication.java
@@ -43,7 +43,7 @@ public class ResourcePathIndication extends AbstractIndicationWithResponse
if (info == null)
{
- int rid = mapper.getNextRid();
+ int rid = mapper.getNextRID();
resourceManager.registerResourceInfo(path, rid, 1);
if (isDebugEnabled()) debug("No resource with path " + path);
@@ -52,8 +52,8 @@ public class ResourcePathIndication extends AbstractIndicationWithResponse
}
else
{
- if (isDebugEnabled()) debug("Responding rid " + info.getRid());
- transmitInt(info.getRid());
+ if (isDebugEnabled()) debug("Responding rid " + info.getRID());
+ transmitInt(info.getRID());
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOProtocolImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOProtocolImpl.java
index 71e358d..35af66f 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOProtocolImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/ServerCDOProtocolImpl.java
@@ -92,12 +92,12 @@ public class ServerCDOProtocolImpl extends AbstractCDOProtocol implements Server
doSet("transactionTemplate", transactionTemplate);
}
- public ServerCDOResProtocol getCdoResServerProtocol()
+ public ServerCDOResProtocol getServerCDOResProtocol()
{
return serverCDOResProtocol;
}
- public void setCdoResServerProtocol(ServerCDOResProtocol serverCDOResProtocol)
+ public void setServerCDOResProtocol(ServerCDOResProtocol serverCDOResProtocol)
{
doSet("serverCDOResProtocol", serverCDOResProtocol);
}
diff --git a/plugins/org.eclipse.net4j.util/copyright.txt b/plugins/org.eclipse.net4j.util/copyright.txt
new file mode 100644
index 0000000..7d67d89
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/copyright.txt
@@ -0,0 +1,8 @@
+Copyright (c) 2004, 2005, 2006 Eike Stepper, Fuggerstr. 39, 10777 Berlin, Germany.
+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:
+ Eike Stepper - initial API and implementation \ No newline at end of file
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/Assert.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/Assert.java
index b389e83..bf2a13c 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/Assert.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/Assert.java
@@ -1,19 +1,6 @@
package org.eclipse.net4j.util;
-/**
- * <code>Assert</code> is useful for for embedding runtime sanity checks
- * in code.
- * The predicate methods all test a condition and throw some
- * type of unchecked exception if the condition does not hold.
- * <p>
- * Assertion failure exceptions, like most runtime exceptions, are
- * thrown when something is misbehaving. Assertion failures are invariably
- * unspecified behavior; consequently, clients should never rely on
- * these being thrown (and certainly should not being catching them
- * specifically).
- * </p>
- */
public final class Assert
{
/* This class is not intended to be instantiated. */
@@ -22,25 +9,11 @@ public final class Assert
// not allowed
}
- /** Asserts that the given object is not <code>null</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- *
- * @param object the value to test
- * @exception IllegalArgumentException if the object is <code>null</code>
- */
public static void isNotNull(Object object)
{
isNotNull(object, ""); //$NON-NLS-1$
}
- /** Asserts that the given object is not <code>null</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- * The given message is included in that exception, to aid debugging.
- *
- * @param object the value to test
- * @param message the message to include in the exception
- * @exception IllegalArgumentException if the object is <code>null</code>
- */
public static void isNotNull(Object object, String message)
{
if (object == null)
@@ -51,27 +24,11 @@ public final class Assert
}
}
- /** Asserts that the given boolean is <code>true</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- *
- * @param expression the outcode of the check
- * @return <code>true</code> if the check passes (does not return
- * if the check fails)
- */
public static boolean isTrue(boolean expression)
{
return isTrue(expression, ""); //$NON-NLS-1$
}
- /** Asserts that the given boolean is <code>true</code>. If this
- * is not the case, some kind of unchecked exception is thrown.
- * The given message is included in that exception, to aid debugging.
- *
- * @param expression the outcode of the check
- * @param message the message to include in the exception
- * @return <code>true</code> if the check passes (does not return
- * if the check fails)
- */
public static boolean isTrue(boolean expression, String message)
{
if (!expression)