Author: epbernard
Date: 2006-11-01 01:03:25 -0500 (Wed, 01 Nov 2006)
New Revision: 10673
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BigDecimalBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BigIntegerBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BridgeFactory.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/DateBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/DoubleBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/FieldBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/FloatBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/IdFieldBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/IntegerBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/LongBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/NumberBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/ParameterizedBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/Resolution.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/String2IdFieldBridgeAdaptor.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/StringBridge.java
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/StringImplBridge.java
Log:
style
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BigDecimalBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BigDecimalBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BigDecimalBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -1,7 +1,6 @@
//$Id: $
package org.hibernate.lucene.bridge;
-import java.math.BigInteger;
import java.math.BigDecimal;
import org.hibernate.util.StringHelper;
@@ -13,7 +12,7 @@
*/
public class BigDecimalBridge extends NumberBridge {
public Object stringToObject(String stringValue) {
- if ( StringHelper.isEmpty(stringValue) ) return null;
- return new BigDecimal(stringValue);
+ if ( StringHelper.isEmpty( stringValue ) ) return null;
+ return new BigDecimal( stringValue );
}
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BigIntegerBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BigIntegerBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BigIntegerBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -7,11 +7,12 @@
/**
* Map a BigInteger element
+ *
* @author Emmanuel Bernard
*/
public class BigIntegerBridge extends NumberBridge {
public Object stringToObject(String stringValue) {
- if ( StringHelper.isEmpty(stringValue) ) return null;
- return new BigInteger(stringValue);
+ if ( StringHelper.isEmpty( stringValue ) ) return null;
+ return new BigInteger( stringValue );
}
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BridgeFactory.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BridgeFactory.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/BridgeFactory.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -1,25 +1,27 @@
//$Id: $
package org.hibernate.lucene.bridge;
+import java.math.BigDecimal;
+import java.math.BigInteger;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
-import java.math.BigInteger;
-import java.math.BigDecimal;
import org.hibernate.HibernateException;
-import org.hibernate.reflection.XMember;
-import org.hibernate.reflection.XClass;
import org.hibernate.annotations.Parameter;
import org.hibernate.lucene.DateBridge;
+import org.hibernate.reflection.XClass;
+import org.hibernate.reflection.XMember;
/**
* @author Emmanuel Bernard
*/
public class BridgeFactory {
private static Map<String, FieldBridge> builtInBridges = new HashMap<String,
FieldBridge>();
- private BridgeFactory() {}
+ private BridgeFactory() {
+ }
+
public static final IdFieldBridge DOUBLE = new String2IdFieldBridgeAdaptor( new
DoubleBridge() );
public static final IdFieldBridge FLOAT = new String2IdFieldBridgeAdaptor( new
FloatBridge() );
@@ -28,11 +30,11 @@
public static final IdFieldBridge LONG = new String2IdFieldBridgeAdaptor( new
LongBridge() );
- public static final IdFieldBridge BIG_INTEGER = new String2IdFieldBridgeAdaptor( new
BigIntegerBridge() );
+ public static final IdFieldBridge BIG_INTEGER = new String2IdFieldBridgeAdaptor( new
BigIntegerBridge() );
- public static final IdFieldBridge BIG_DECIMAL = new String2IdFieldBridgeAdaptor( new
BigDecimalBridge() );
+ public static final IdFieldBridge BIG_DECIMAL = new String2IdFieldBridgeAdaptor( new
BigDecimalBridge() );
- public static final IdFieldBridge STRING = new String2IdFieldBridgeAdaptor( new
StringImplBridge() );
+ public static final IdFieldBridge STRING = new String2IdFieldBridgeAdaptor( new
StringImplBridge() );
public static final FieldBridge DATE_YEAR;
public static final FieldBridge DATE_MONTH;
@@ -44,18 +46,18 @@
static {
builtInBridges.put( Double.class.getName(), DOUBLE );
- builtInBridges.put( double.class.getName(), DOUBLE );
- builtInBridges.put( Float.class.getName(), FLOAT );
- builtInBridges.put( float.class.getName(), FLOAT );
- builtInBridges.put( Integer.class.getName(), INTEGER );
- builtInBridges.put( int.class.getName(), INTEGER );
- builtInBridges.put( Long.class.getName(), LONG );
- builtInBridges.put( long.class.getName(), LONG );
- builtInBridges.put( BigInteger.class.getName(), BIG_INTEGER );
- builtInBridges.put( BigDecimal.class.getName(), BIG_DECIMAL );
- builtInBridges.put( String.class.getName(), STRING );
+ builtInBridges.put( double.class.getName(), DOUBLE );
+ builtInBridges.put( Float.class.getName(), FLOAT );
+ builtInBridges.put( float.class.getName(), FLOAT );
+ builtInBridges.put( Integer.class.getName(), INTEGER );
+ builtInBridges.put( int.class.getName(), INTEGER );
+ builtInBridges.put( Long.class.getName(), LONG );
+ builtInBridges.put( long.class.getName(), LONG );
+ builtInBridges.put( BigInteger.class.getName(), BIG_INTEGER );
+ builtInBridges.put( BigDecimal.class.getName(), BIG_DECIMAL );
+ builtInBridges.put( String.class.getName(), STRING );
- DATE_YEAR = org.hibernate.lucene.bridge.DateBridge.DATE_YEAR;
+ DATE_YEAR = org.hibernate.lucene.bridge.DateBridge.DATE_YEAR;
DATE_MONTH = org.hibernate.lucene.bridge.DateBridge.DATE_MONTH;
DATE_DAY = org.hibernate.lucene.bridge.DateBridge.DATE_DAY;
DATE_HOUR = org.hibernate.lucene.bridge.DateBridge.DATE_HOUR;
@@ -68,7 +70,7 @@
public static FieldBridge guessType(XMember member) {
FieldBridge bridge = null;
org.hibernate.lucene.FieldBridge bridgeAnn = member.getAnnotation(
org.hibernate.lucene.FieldBridge.class );
- if (bridgeAnn != null) {
+ if ( bridgeAnn != null ) {
Class impl = bridgeAnn.impl();
try {
Object instance = impl.newInstance();
@@ -87,21 +89,21 @@
}
}
catch (Exception e) {
- //TODO add classname
- throw new HibernateException("Unable to instanciate FieldBridge for
" + member.getName(), e );
+ //TODO add classname
+ throw new HibernateException( "Unable to instanciate FieldBridge for " +
member.getName(), e );
}
}
- else if ( member.isAnnotationPresent( DateBridge.class ) ) {
- Resolution resolution = member.getAnnotation( DateBridge.class ).value();
- bridge = org.hibernate.lucene.bridge.DateBridge.getDateField( resolution );
- }
- else {
+ else if ( member.isAnnotationPresent( DateBridge.class ) ) {
+ Resolution resolution = member.getAnnotation( DateBridge.class ).value();
+ bridge = org.hibernate.lucene.bridge.DateBridge.getDateField( resolution );
+ }
+ else {
//find in built-ins
XClass returnType = member.getType();
bridge = builtInBridges.get( returnType.getName() );
}
- //TODO add classname
- if (bridge == null) throw new HibernateException("Unable to guess
FieldBridge for " + member.getName() );
+ //TODO add classname
+ if ( bridge == null ) throw new HibernateException( "Unable to guess FieldBridge
for " + member.getName() );
return bridge;
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/DateBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/DateBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/DateBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -14,7 +14,7 @@
/**
* Bridge a java.util.Date to a String, truncated to the resolution
* Date are stored GMT based
- *
+ * <p/>
* ie
* Resolution.YEAR: yyyy
* Resolution.MONTH: yyyyMM
@@ -23,30 +23,38 @@
* Resolution.MINUTE: yyyyMMddHHmm
* Resolution.SECOND: yyyyMMddHHmmss
* Resolution.MILLISECOND: yyyyMMddHHmmssSSS
- *
+ *
* @author Emmanuel Bernard
*/
public class DateBridge implements StringBridge, ParameterizedBridge {
- public static final String2FieldBridgeAdaptor DATE_YEAR = new
String2FieldBridgeAdaptor( new DateBridge( Resolution.YEAR ) );
- public static final String2FieldBridgeAdaptor DATE_MONTH = new
String2FieldBridgeAdaptor( new DateBridge( Resolution.MONTH ) );
- public static final String2FieldBridgeAdaptor DATE_DAY = new String2FieldBridgeAdaptor(
new DateBridge( Resolution.DAY ) );
- public static final String2FieldBridgeAdaptor DATE_HOUR = new String2FieldBridgeAdaptor(
new DateBridge( Resolution.HOUR ) );
- public static final String2FieldBridgeAdaptor DATE_MINUTE = new
String2FieldBridgeAdaptor( new DateBridge( Resolution.MINUTE ) );
- public static final String2FieldBridgeAdaptor DATE_SECOND = new
String2FieldBridgeAdaptor( new DateBridge( Resolution.SECOND ) );
- public static final String2IdFieldBridgeAdaptor DATE_MILLISECOND = new
String2IdFieldBridgeAdaptor( new DateBridge( Resolution.MILLISECOND ) );
+ public static final String2FieldBridgeAdaptor DATE_YEAR =
+ new String2FieldBridgeAdaptor( new DateBridge( Resolution.YEAR ) );
+ public static final String2FieldBridgeAdaptor DATE_MONTH =
+ new String2FieldBridgeAdaptor( new DateBridge( Resolution.MONTH ) );
+ public static final String2FieldBridgeAdaptor DATE_DAY =
+ new String2FieldBridgeAdaptor( new DateBridge( Resolution.DAY ) );
+ public static final String2FieldBridgeAdaptor DATE_HOUR =
+ new String2FieldBridgeAdaptor( new DateBridge( Resolution.HOUR ) );
+ public static final String2FieldBridgeAdaptor DATE_MINUTE =
+ new String2FieldBridgeAdaptor( new DateBridge( Resolution.MINUTE ) );
+ public static final String2FieldBridgeAdaptor DATE_SECOND =
+ new String2FieldBridgeAdaptor( new DateBridge( Resolution.SECOND ) );
+ public static final String2IdFieldBridgeAdaptor DATE_MILLISECOND =
+ new String2IdFieldBridgeAdaptor( new DateBridge( Resolution.MILLISECOND ) );
- DateTools.Resolution resolution;
+ DateTools.Resolution resolution;
- public DateBridge() {}
+ public DateBridge() {
+ }
- public DateBridge(Resolution resolution) {
- setResolution( resolution );
- }
+ public DateBridge(Resolution resolution) {
+ setResolution( resolution );
+ }
- public Object stringToObject(String stringValue) {
- if ( StringHelper.isEmpty(stringValue) ) return null;
- try {
+ public Object stringToObject(String stringValue) {
+ if ( StringHelper.isEmpty( stringValue ) ) return null;
+ try {
return DateTools.stringToDate( stringValue );
}
catch (ParseException e) {
@@ -55,25 +63,25 @@
}
public String objectToString(Object object) {
- return object != null ?
- DateTools.dateToString( (Date) object, resolution ) :
- null;
+ return object != null ?
+ DateTools.dateToString( (Date) object, resolution ) :
+ null;
}
public void setParameterValues(Map parameters) {
- Object resolution = parameters.get( "resolution" );
- Resolution hibResolution;
- if (resolution instanceof String) {
- hibResolution = Resolution.valueOf( ( (String) resolution ).toUpperCase(
Locale.ENGLISH ) );
- }
- else {
- hibResolution = (Resolution) resolution;
- }
- setResolution( hibResolution );
- }
+ Object resolution = parameters.get( "resolution" );
+ Resolution hibResolution;
+ if ( resolution instanceof String ) {
+ hibResolution = Resolution.valueOf( ( (String) resolution ).toUpperCase(
Locale.ENGLISH ) );
+ }
+ else {
+ hibResolution = (Resolution) resolution;
+ }
+ setResolution( hibResolution );
+ }
- private void setResolution(Resolution hibResolution) {
- switch ( hibResolution ) {
+ private void setResolution(Resolution hibResolution) {
+ switch (hibResolution) {
case YEAR:
this.resolution = DateTools.Resolution.YEAR;
break;
@@ -99,11 +107,11 @@
throw new AssertionFailure( "Unknown Resolution: " + hibResolution );
}
- }
+ }
- public static String2FieldBridgeAdaptor getDateField(Resolution resolution) {
- switch( resolution ) {
- case YEAR:
+ public static String2FieldBridgeAdaptor getDateField(Resolution resolution) {
+ switch (resolution) {
+ case YEAR:
return DATE_YEAR;
case MONTH:
return DATE_MONTH;
@@ -119,6 +127,6 @@
return DATE_MILLISECOND;
default:
throw new AssertionFailure( "Unknown Resolution: " + resolution );
- }
- }
+ }
+ }
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/DoubleBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/DoubleBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/DoubleBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -10,7 +10,7 @@
*/
public class DoubleBridge extends NumberBridge {
public Object stringToObject(String stringValue) {
- if ( StringHelper.isEmpty(stringValue) ) return null;
- return new Double(stringValue);
+ if ( StringHelper.isEmpty( stringValue ) ) return null;
+ return new Double( stringValue );
}
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/FieldBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/FieldBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/FieldBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -13,11 +13,11 @@
//TODO should show Field or document?
//document is nice since I can save an object into several fields
public interface FieldBridge {
- /**
- * Manipulate the document to index the given value.
- * A common implementation is to add a Field <code>name</code> to the
given document following
- * the parameters (<code>store</code>, <code>index</code>,
<code>boost</code>) if the
- * <code>value></code> is not null
- */
- void set(String name, Object value, Document document, Field.Store store, Field.Index
index, Float boost);
+ /**
+ * Manipulate the document to index the given value.
+ * A common implementation is to add a Field <code>name</code> to the given
document following
+ * the parameters (<code>store</code>, <code>index</code>,
<code>boost</code>) if the
+ * <code>value></code> is not null
+ */
+ void set(String name, Object value, Document document, Field.Store store, Field.Index
index, Float boost);
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/FloatBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/FloatBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/FloatBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -10,7 +10,7 @@
*/
public class FloatBridge extends NumberBridge {
public Object stringToObject(String stringValue) {
- if ( StringHelper.isEmpty(stringValue) ) return null;
- return new Float(stringValue);
+ if ( StringHelper.isEmpty( stringValue ) ) return null;
+ return new Float( stringValue );
}
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/IdFieldBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/IdFieldBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/IdFieldBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -10,20 +10,20 @@
*/
//FIXME rework the interface inheritance there are some common concepts with
StringBridge
public interface IdFieldBridge extends FieldBridge {
- /**
- * build the element from the Document
- * This method is called when the bridge is used on a document id, If the Bridge is
not expected to
- * support document id, this method should raise an exception
- * The return value is the Entity id
- *
- * @param name field name
- * @param document document
- */
- Object get(String name, Document document);
+ /**
+ * build the element from the Document
+ * This method is called when the bridge is used on a document id, If the Bridge is not
expected to
+ * support document id, this method should raise an exception
+ * The return value is the Entity id
+ *
+ * @param name field name
+ * @param document document
+ */
+ Object get(String name, Document document);
- /**
+ /**
* convert the object representation to a String
- * The return String must not be null, it can be empty though
+ * The return String must not be null, it can be empty though
*/
String objectToString(Object object);
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/IntegerBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/IntegerBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/IntegerBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -10,7 +10,7 @@
*/
public class IntegerBridge extends NumberBridge {
public Object stringToObject(String stringValue) {
- if ( StringHelper.isEmpty(stringValue) ) return null;
- return new Integer(stringValue);
+ if ( StringHelper.isEmpty( stringValue ) ) return null;
+ return new Integer( stringValue );
}
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/LongBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/LongBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/LongBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -10,7 +10,7 @@
*/
public class LongBridge extends NumberBridge {
public Object stringToObject(String stringValue) {
- if ( StringHelper.isEmpty(stringValue) ) return null;
- return new Long(stringValue);
+ if ( StringHelper.isEmpty( stringValue ) ) return null;
+ return new Long( stringValue );
}
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/NumberBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/NumberBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/NumberBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -1,17 +1,13 @@
//$Id: $
package org.hibernate.lucene.bridge;
-import java.util.Date;
-
-import org.apache.lucene.document.DateTools;
-
/**
* @author Emmanuel Bernard
*/
public abstract class NumberBridge implements StringBridge {
public String objectToString(Object object) {
- return object != null ?
- object.toString() :
- null;
+ return object != null ?
+ object.toString() :
+ null;
}
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/ParameterizedBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/ParameterizedBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/ParameterizedBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -9,6 +9,6 @@
* @author Emmanuel Bernard
*/
public interface ParameterizedBridge {
- //TODO inject Properties? since the annotations cannot support Object attribute?
- void setParameterValues(Map parameters);
+ //TODO inject Properties? since the annotations cannot support Object attribute?
+ void setParameterValues(Map parameters);
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/Resolution.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/Resolution.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/Resolution.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -8,7 +8,7 @@
*/
public enum Resolution {
YEAR,
- MONTH,
+ MONTH,
DAY,
HOUR,
MINUTE,
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/String2IdFieldBridgeAdaptor.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/String2IdFieldBridgeAdaptor.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/String2IdFieldBridgeAdaptor.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -3,7 +3,6 @@
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
-import org.hibernate.util.StringHelper;
/**
* Bridge to use a StringBridge as a IdFieldBridge
@@ -13,7 +12,7 @@
public class String2IdFieldBridgeAdaptor extends String2FieldBridgeAdaptor implements
IdFieldBridge {
public String2IdFieldBridgeAdaptor(StringBridge stringBridge) {
- super(stringBridge);
+ super( stringBridge );
}
public String objectToString(Object object) {
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/StringBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/StringBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/StringBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -15,7 +15,7 @@
/**
* convert the object representation to a String
- * The return String must not be null, it can be empty though
+ * The return String must not be null, it can be empty though
*/
String objectToString(Object object);
}
Modified:
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/StringImplBridge.java
===================================================================
---
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/StringImplBridge.java 2006-11-01
05:46:08 UTC (rev 10672)
+++
branches/Lucene_Integration/HibernateExt/metadata/src/java/org/hibernate/lucene/bridge/StringImplBridge.java 2006-11-01
06:03:25 UTC (rev 10673)
@@ -1,18 +1,17 @@
//$Id: $
package org.hibernate.lucene.bridge;
-import org.hibernate.util.StringHelper;
-
/**
* Map a string element
+ *
* @author Emmanuel Bernard
*/
public class StringImplBridge implements StringBridge {
public Object stringToObject(String stringValue) {
- return stringValue;
+ return stringValue;
}
public String objectToString(Object object) {
- return (String) object;
+ return (String) object;
}
}