01: /**
02: * Objective Database Abstraction Layer (ODAL)
03: * Copyright (c) 2004, The ODAL Development Group
04: * All rights reserved.
05: * For definition of the ODAL Development Group please refer to LICENCE.txt file
06: *
07: * Distributable under LGPL license.
08: * See terms of license at gnu.org.
09: */package com.completex.objective.components.persistency.rule.impl;
10:
11: import com.completex.objective.components.persistency.PersistentEntry;
12: import com.completex.objective.components.persistency.rule.RuleException;
13:
14: /**
15: * @author Gennady Krizhevsky
16: */
17: public class TrimWhiteSpaceFieldConvertor extends
18: AbstractFieldConvertor {
19:
20: public void convert(PersistentEntry entry) throws RuleException {
21: // RuleHelper.assertRecordAndIndex(entry, fieldIndex);
22: if (!entry.isDirty() || entry.getString() == null) {
23: return;
24: }
25:
26: String value = entry.getString();
27: setValue(entry, value.trim());
28: }
29:
30: }
|