Author: pnedonosko
Date: 2010-01-28 10:42:44 -0500 (Thu, 28 Jan 2010)
New Revision: 1613
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/cas/JDBCValueContentAddressStorageImpl.java
Log:
EXOJCR-310 codeformat
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/cas/JDBCValueContentAddressStorageImpl.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/cas/JDBCValueContentAddressStorageImpl.java 2010-01-28
15:36:23 UTC (rev 1612)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/value/cas/JDBCValueContentAddressStorageImpl.java 2010-01-28
15:42:44 UTC (rev 1613)
@@ -88,8 +88,8 @@
/**
* MYSQL_PK_CONSTRAINT_DETECT.
*/
- private static final Pattern MYSQL_PK_CONSTRAINT_DETECT =
- Pattern.compile(MYSQL_PK_CONSTRAINT_DETECT_PATTERN, Pattern.CASE_INSENSITIVE);
+ private static final Pattern MYSQL_PK_CONSTRAINT_DETECT =
Pattern.compile(MYSQL_PK_CONSTRAINT_DETECT_PATTERN,
+ Pattern.CASE_INSENSITIVE);
/**
* DB2_PK_CONSTRAINT_DETECT_PATTERN.
@@ -155,7 +155,7 @@
this.dialect = dialect;
// init database metadata
- final String tn = props.getProperty(TABLE_NAME_PARAM);
+ String tn = props.getProperty(TABLE_NAME_PARAM);
if (tn != null)
{
tableName = tn;
@@ -278,8 +278,10 @@
// check is it a primary key vioaltion or smth else
// if primary key - it's record already exists issue, VCAS error otherwise.
if (isRecordAlreadyExistsException(e))
+ {
throw new RecordAlreadyExistsException("Record already exists,
propertyId=" + propertyId + " orderNum="
+ orderNum + ". Error: " + e, e);
+ }
throw new VCASException("VCAS ADD database error: " + e, e);
}
@@ -345,7 +347,9 @@
ps.close();
if (res <= 0)
+ {
throw new RecordNotFoundException("Record not found,
propertyId=" + propertyId);
+ }
}
finally
{
@@ -375,8 +379,10 @@
ps.close();
if (res <= 0)
+ {
throw new RecordNotFoundException("Value record not found,
propertyId=" + propertyId + " orderNumb="
+ orderNumb);
+ }
}
finally
{
@@ -409,8 +415,10 @@
return rs.getString("CAS_ID");
}
else
+ {
throw new RecordNotFoundException("No record found with
propertyId=" + propertyId + " orderNum="
+ orderNum);
+ }
}
finally
{
@@ -453,7 +461,9 @@
return ids;
}
else
+ {
throw new RecordNotFoundException("No records found with
propertyId=" + propertyId);
+ }
}
else
{
@@ -471,7 +481,9 @@
return ids;
}
else
+ {
throw new RecordNotFoundException("No records found with
propertyId=" + propertyId);
+ }
}
}
finally
Show replies by date