All Downloads are FREE. Search and download functionalities are using the official Maven repository.

at.spardat.xma.mdl.simple.ISimpleWM Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
/*******************************************************************************
 * Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     s IT Solutions AT Spardat GmbH - initial API and implementation
 *******************************************************************************/

// @(#) $Id: ISimpleWM.java 2089 2007-11-28 13:56:13Z s3460 $
package at.spardat.xma.mdl.simple;

import java.math.BigDecimal;
import java.util.Date;

import at.spardat.xma.mdl.IAtomic;

/**
 * A SimpleWM models the data that might be contained in a Text or Label, Check Box, 
 * Radio Button or Toggle Button on a UI. The content of this is typed, although that is 
 * not reflected via a class hierarchy. The type is stored in a type 
 * field an may be queries using the method getType(). getType() returns a type constant of the 
 * class {@link at.spardat.enterprise.util.Types}. 

* * The atomic value encapsulated by this is String encoded, see class * {@link at.spardat.xma.mdl.Atom Atom}. * * @author YSD, 23.06.2003 13:45:50 */ public interface ISimpleWM extends IAtomic { /** * Sets this TextModel to the empty string. */ public void clear(); /** * Sets the value of this model from a string. Clears this if value==null. * * @param value the string to set * @exception IllegalStateException if getType() is not equal to T_STRING or T_DOM. */ public void set (String value); /** * Sets the value from a double. * * @param value the value to set * @param precision the number of places after the comma used when converting * the double to a string. * @exception IllegalStateException if getType() is not equal to T_BCD or * if the provided double is NaN or Infinity. */ public void set (double value, int precision); /** * Sets the value from a double. If the provided * double (which is binary coded) would result in an unexact decimal * representation, the fractional part of the result is stripped so that there * are no more then 15 significant digits. * * @param value the value to set * @exception IllegalStateException if getType() is not equal to T_BCD or * if the provided double is NaN or Infinity. */ public void set (double value); /** * Sets the value from the provided BigDecimal. * Clears this if value is null. * * @exception IllegalStateException if the type of this is not numeric. */ public void set (BigDecimal value); /** * Sets this from an int. * * @param value the provided integer to set. * @exception IllegalStateException if the type of this is not T_BCD. */ public void set (int value); /** * Sets this from a provided java.util.Date. * * @param value the value to set * @exception IllegalStateException if the type of this is not equal to T_DATE or T_TIMESTAMP. */ public void set (Date value); /** * Sets the value of this from the provided boolean. * * @param value the boolean value to set * @exception IllegalStateException if the type of this is not T_BOOLEAN. */ public void set (boolean value); /** * Sets the value from a Boolean. If val is null, this is cleared. * * @param val the value to set * @exception IllegalStateException if the type of this is not T_BOOLEAN */ public void set (Boolean val); /** * Sets the value from a Byte.

* If the value is null, this is cleared. * * @exception IllegalStateException if the type of this is not T_BCD */ public void set (Byte val); /** * Sets the value from a Short.

* If the value is null, this is cleared. * * @exception IllegalStateException if the type of this is not T_BCD */ public void set (Short val); /** * Sets the value from an Integer.

* If the value is null, this is cleared. * * @exception IllegalStateException if the type of this is not T_BCD */ public void set (Integer val); /** * If the value is null, this is cleared. * * @exception IllegalStateException if the type of this is not T_BCD */ public void set (Long val); /** * If the value is null, this is cleared. * * @exception IllegalStateException if the type of this is not T_BCD */ public void set (Float val); /** * Sets the value from a Double.

* If the value is null, this is cleared. * * @exception IllegalStateException if the type of this is not T_BCD */ public void set (Double val); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy