From 513ce9aa60f16648ffa00442c5ec8b90072d916e Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Mon, 14 Apr 2008 20:18:45 +0000 Subject: [PATCH] Yank our nomenclature into consistency -- indices, not indexes; fields(), not fieldNames(), as per Ray's suggestion. --- src/java/com/samskivert/jdbc/depot/DepotMarshaller.java | 2 +- src/java/com/samskivert/jdbc/depot/MySQLBuilder.java | 4 ++-- src/java/com/samskivert/jdbc/depot/PostgreSQLBuilder.java | 2 +- src/java/com/samskivert/jdbc/depot/annotation/Entity.java | 2 +- .../com/samskivert/jdbc/depot/annotation/FullTextIndex.java | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java b/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java index 420b4e1..1395dd7 100644 --- a/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java +++ b/src/java/com/samskivert/jdbc/depot/DepotMarshaller.java @@ -209,7 +209,7 @@ public class DepotMarshaller } // if there are FTS indexes in the Table, map those out here for future use - for (FullTextIndex fti : entity.fullTextIndexes()) { + for (FullTextIndex fti : entity.fullTextIndices()) { if (_fullTextIndexes.containsKey(fti.name())) { continue; } diff --git a/src/java/com/samskivert/jdbc/depot/MySQLBuilder.java b/src/java/com/samskivert/jdbc/depot/MySQLBuilder.java index 3d83da4..59887b8 100644 --- a/src/java/com/samskivert/jdbc/depot/MySQLBuilder.java +++ b/src/java/com/samskivert/jdbc/depot/MySQLBuilder.java @@ -61,7 +61,7 @@ public class MySQLBuilder _builder.append("match("); Class pClass = match.getPersistentRecord(); String[] fields = - _types.getMarshaller(pClass).getFullTextIndex(match.getName()).fieldNames(); + _types.getMarshaller(pClass).getFullTextIndex(match.getName()).fields(); for (int ii = 0; ii < fields.length; ii ++) { if (ii > 0) { _builder.append(", "); @@ -150,7 +150,7 @@ public class MySQLBuilder StringBuilder update = new StringBuilder("ALTER TABLE "). append(marshaller.getTableName()).append(" ADD FULLTEXT INDEX ftsIx_"). append(fts.name()).append(" ("); - String[] fields = fts.fieldNames(); + String[] fields = fts.fields(); for (int ii = 0; ii < fields.length; ii ++) { if (ii > 0) { update.append(", "); diff --git a/src/java/com/samskivert/jdbc/depot/PostgreSQLBuilder.java b/src/java/com/samskivert/jdbc/depot/PostgreSQLBuilder.java index c1a887b..c14218f 100644 --- a/src/java/com/samskivert/jdbc/depot/PostgreSQLBuilder.java +++ b/src/java/com/samskivert/jdbc/depot/PostgreSQLBuilder.java @@ -126,7 +126,7 @@ public class PostgreSQLBuilder Class pClass = marshaller.getPersistentClass(); DatabaseLiaison liaison = LiaisonRegistry.getLiaison(conn); - String[] fields = fts.fieldNames(); + String[] fields = fts.fields(); String table = marshaller.getTableName(); String column = "ftsCol_" + fts.name(); diff --git a/src/java/com/samskivert/jdbc/depot/annotation/Entity.java b/src/java/com/samskivert/jdbc/depot/annotation/Entity.java index 842b644..5cdf204 100644 --- a/src/java/com/samskivert/jdbc/depot/annotation/Entity.java +++ b/src/java/com/samskivert/jdbc/depot/annotation/Entity.java @@ -44,5 +44,5 @@ public @interface Entity Index[] indices () default {}; /** Full-text search indexes defined on this entity, if any. Defaults to none. */ - FullTextIndex[] fullTextIndexes () default {}; + FullTextIndex[] fullTextIndices () default {}; } diff --git a/src/java/com/samskivert/jdbc/depot/annotation/FullTextIndex.java b/src/java/com/samskivert/jdbc/depot/annotation/FullTextIndex.java index 386fb4c..d35bdc5 100644 --- a/src/java/com/samskivert/jdbc/depot/annotation/FullTextIndex.java +++ b/src/java/com/samskivert/jdbc/depot/annotation/FullTextIndex.java @@ -40,5 +40,5 @@ public @interface FullTextIndex /** * An array of the field names that should be indexed. */ - public String[] fieldNames (); + public String[] fields (); }