From 4071a5d16578d367e527279dc48ac2b70677142f Mon Sep 17 00:00:00 2001 From: Redkale <22250530@qq.com> Date: Tue, 17 Jan 2017 13:37:34 +0800 Subject: [PATCH] --- src/javax/persistence/Index.java | 29 ++++++++++--------- src/javax/persistence/Table.java | 2 ++ src/javax/persistence/UniqueConstraint.java | 16 ++++++---- .../source/DistributeTableStrategy.java | 6 ++-- src/org/redkale/source/FilterNode.java | 1 + 5 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/javax/persistence/Index.java b/src/javax/persistence/Index.java index 5899a0330..b5f5d9909 100644 --- a/src/javax/persistence/Index.java +++ b/src/javax/persistence/Index.java @@ -1,4 +1,4 @@ -/******************************************************************************* +/** ***************************************************************************** * Copyright (c) 2011 - 2013 Oracle Corporation. All rights reserved. * * This program and the accompanying materials are made available under the @@ -11,7 +11,7 @@ * Contributors: * Linda DeMichiel - Java Persistence 2.1 * - ******************************************************************************/ + ***************************************************************************** */ package javax.persistence; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -24,23 +24,18 @@ import java.lang.annotation.Target; * Note that it is not necessary to specify an index for a primary key, * as the primary key index will be created automatically. * - *
- * The syntax of the columnList element is a
+ *
+ * The syntax of the columnList element is a
* column_list, as follows:
- *
+ *
*
* column::= index_column [,index_column]* * index_column::= column_name [ASC | DESC] *- * - *
If ASC or DESC is not specified,
- * ASC (ascending order) is assumed.
*
- * @see Table
- * @see SecondaryTable
- * @see CollectionTable
- * @see JoinTable
- * @see TableGenerator
+ *
+ * If ASC or DESC is not specified,
+ * ASC (ascending order) is assumed.
*
* @since Java Persistence 2.1
*
@@ -51,17 +46,23 @@ public @interface Index {
/**
* (Optional) The name of the index; defaults to a provider-generated name.
+ *
+ * @return String
*/
String name() default "";
/**
- * (Required) The names of the columns to be included in the index,
+ * (Required) The names of the columns to be included in the index,
* in order.
+ *
+ * @return String
*/
String columnList();
/**
* (Optional) Whether the index is unique.
+ *
+ * @return boolean
*/
boolean unique() default false;
diff --git a/src/javax/persistence/Table.java b/src/javax/persistence/Table.java
index 353f62af0..e0be2eaa3 100644
--- a/src/javax/persistence/Table.java
+++ b/src/javax/persistence/Table.java
@@ -67,6 +67,7 @@ public @interface Table {
* annotations and constraints entailed by primary key mappings.
*
* Defaults to no additional constraints.
+ * @return UniqueConstraint[]
*/
UniqueConstraint[] uniqueConstraints() default {};
@@ -76,6 +77,7 @@ public @interface Table {
* to specify an index for a primary key, as the primary key
* index will be created automatically.
*
+ * @return indexes
* @since Java Persistence 2.1
*/
Index[] indexes() default {};
diff --git a/src/javax/persistence/UniqueConstraint.java b/src/javax/persistence/UniqueConstraint.java
index 2351b4511..ccb736f0f 100644
--- a/src/javax/persistence/UniqueConstraint.java
+++ b/src/javax/persistence/UniqueConstraint.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/** *****************************************************************************
* Copyright (c) 2008 - 2013 Oracle Corporation. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -12,7 +12,7 @@
* Linda DeMichiel - Java Persistence 2.1
* Linda DeMichiel - Java Persistence 2.0
*
- ******************************************************************************/
+ ***************************************************************************** */
package javax.persistence;
import java.lang.annotation.Target;
@@ -27,7 +27,7 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
* Example:
* @Entity
* @Table(
- * name="EMPLOYEE",
+ * name="EMPLOYEE",
* uniqueConstraints=
* @UniqueConstraint(columnNames={"EMP_ID", "EMP_NAME"})
* )
@@ -36,17 +36,21 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
*
* @since Java Persistence 1.0
*/
-@Target({})
+@Target({})
@Retention(RUNTIME)
public @interface UniqueConstraint {
- /** (Optional) Constraint name. A provider-chosen name will be chosen
+ /** (Optional) Constraint name. A provider-chosen name will be chosen
* if a name is not specified.
*
+ * @return String
* @since Java Persistence 2.0
*/
String name() default "";
- /** (Required) An array of the column names that make up the constraint. */
+ /** (Required) An array of the column names that make up the constraint.
+ *
+ * @return String[]
+ */
String[] columnNames();
}
diff --git a/src/org/redkale/source/DistributeTableStrategy.java b/src/org/redkale/source/DistributeTableStrategy.java
index ce3cd1d90..fa23546b2 100644
--- a/src/org/redkale/source/DistributeTableStrategy.java
+++ b/src/org/redkale/source/DistributeTableStrategy.java
@@ -24,7 +24,7 @@ public interface DistributeTableStrategy