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 UpperCaseFieldConvertor extends AbstractFieldConvertor {
18:
19: public void convert(PersistentEntry entry) throws RuleException {
20: // RuleHelper.assertRecordAndIndex(entry, fieldIndex);
21: if (!entry.isDirty()) {
22: return;
23: }
24:
25: String value = entry.getString();
26: if (value == null) {
27: return;
28: }
29:
30: setValue(entry, value.toUpperCase());
31: }
32:
33: }
|