summaryrefslogtreecommitdiff
path: root/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOSQLExpressionFactory.java
diff options
context:
space:
mode:
authorBenjamin Culkin <scorpress@gmail.com>2024-05-20 17:58:16 -0400
committerBenjamin Culkin <scorpress@gmail.com>2024-05-20 17:58:16 -0400
commit40a9d99496e098562f090fb7ffce9e749011b131 (patch)
tree437df24d65470582e943e494a52db8ed65a881ae /projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOSQLExpressionFactory.java
parentff072dfe782f6f22123cd4ba050828d35c0d0fbd (diff)
Formatting pass
Diffstat (limited to 'projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOSQLExpressionFactory.java')
-rw-r--r--projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOSQLExpressionFactory.java44
1 files changed, 24 insertions, 20 deletions
diff --git a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOSQLExpressionFactory.java b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOSQLExpressionFactory.java
index 6bdbffe..4e20a7a 100644
--- a/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOSQLExpressionFactory.java
+++ b/projects/net.wotonomy.persistence/src/main/java/net/wotonomy/access/EOSQLExpressionFactory.java
@@ -25,11 +25,11 @@ import net.wotonomy.foundation.NSArray;
import net.wotonomy.foundation.NSDictionary;
/**
-*
-* @author ezamudio@nasoft.com
-* @author $Author: cgruber $
-* @version $Revision: 894 $
-*/
+ *
+ * @author ezamudio@nasoft.com
+ * @author $Author: cgruber $
+ * @version $Revision: 894 $
+ */
public class EOSQLExpressionFactory {
protected EOAdaptor _adaptor;
@@ -49,8 +49,9 @@ public class EOSQLExpressionFactory {
}
/**
- * Creates an instance of the adaptor's expression class,
- * with entity assigned to it.
+ * Creates an instance of the adaptor's expression class, with entity assigned
+ * to it.
+ *
* @param entity The entity with which to initialize the expression.
* @return An EOSQLExpression.
*/
@@ -58,13 +59,14 @@ public class EOSQLExpressionFactory {
EOSQLExpression expr = null;
if (_instantiator == null) {
try {
- _instantiator = _expressionClass.getConstructor(new Class[]{ EOEntity.class });
+ _instantiator = _expressionClass.getConstructor(new Class[] { EOEntity.class });
} catch (Exception ex) {
- throw new IllegalArgumentException("The expression class " + _expressionClass.getName() + " has no constructor with an entity parameter.");
+ throw new IllegalArgumentException("The expression class " + _expressionClass.getName()
+ + " has no constructor with an entity parameter.");
}
}
try {
- expr = (EOSQLExpression)_instantiator.newInstance(new Object[]{ entity });
+ expr = (EOSQLExpression) _instantiator.newInstance(new Object[] { entity });
} catch (Exception ex) {
throw new IllegalArgumentException("Cannot create new expression of class " + _expressionClass.getName());
}
@@ -87,7 +89,8 @@ public class EOSQLExpressionFactory {
return expr;
}
- public EOSQLExpression selectStatementForAttributes(NSArray atts, boolean lock, EOFetchSpecification fspec, EOEntity entity) {
+ public EOSQLExpression selectStatementForAttributes(NSArray atts, boolean lock, EOFetchSpecification fspec,
+ EOEntity entity) {
EOSQLExpression expr = createExpression(entity);
expr.prepareSelectExpressionWithAttributes(atts, lock, fspec);
return expr;
@@ -102,7 +105,7 @@ public class EOSQLExpressionFactory {
public EOSQLExpression expressionForString(String sql) {
EOSQLExpression expr = null;
try {
- expr = (EOSQLExpression)_expressionClass.newInstance();
+ expr = (EOSQLExpression) _expressionClass.newInstance();
} catch (Exception e) {
return null;
}
@@ -116,16 +119,17 @@ public class EOSQLExpressionFactory {
}
/*
- * $Log$
- * Revision 1.2 2006/02/16 16:47:14 cgruber
- * Move some classes in to "internal" packages and re-work imports, etc.
+ * $Log$ Revision 1.2 2006/02/16 16:47:14 cgruber Move some classes in to
+ * "internal" packages and re-work imports, etc.
*
- * Also use UnsupportedOperationExceptions where appropriate, instead of WotonomyExceptions.
+ * Also use UnsupportedOperationExceptions where appropriate, instead of
+ * WotonomyExceptions.
*
- * Revision 1.1 2006/02/16 13:19:57 cgruber
- * Check in all sources in eclipse-friendly maven-enabled packages.
+ * Revision 1.1 2006/02/16 13:19:57 cgruber Check in all sources in
+ * eclipse-friendly maven-enabled packages.
*
- * Revision 1.1 2003/08/13 01:04:32 chochos
- * the SQL generation classes. EOSQLExpression still needs a lot of work, but the factory is pretty much done.
+ * Revision 1.1 2003/08/13 01:04:32 chochos the SQL generation classes.
+ * EOSQLExpression still needs a lot of work, but the factory is pretty much
+ * done.
*
*/ \ No newline at end of file