info.aduna.gee.publication.simpleshop
Class Option

java.lang.Object
  extended by info.aduna.gee.publication.simpleshop.Option
Direct Known Subclasses:
VolumeDiscountOption

public class Option
extends Object


Field Summary
protected  int _iteratorCount
           
 String description
           
 String id
           
 String selectedValue
           
 WProperties values
           
 
Constructor Summary
Option(String serialized)
          Create an Option from its serialized version.
Option(String id, String description, WProperties values, String selectedValue)
          Create a new Option.
 
Method Summary
protected  String _getValue(int order)
           
 String getFirstValue()
           
 String getNextValue()
           
 double getPrice(Product p)
           
 char getPriceType(Product p)
           
 boolean hasMoreValues()
           
 void startIterator()
           
 String toShortString()
          Creates a String representation of this Option that contains only the essential information for the server-side to work with.
 String toString()
          Creates a String representation of this Option that contains all information about the Option.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public String id

description

public String description

values

public WProperties values

selectedValue

public String selectedValue

_iteratorCount

protected int _iteratorCount
Constructor Detail

Option

public Option(String id,
              String description,
              WProperties values,
              String selectedValue)
Create a new Option.

Parameters:
id - the ID of the Option in the database
description - a description of the Option
values - the possible OptionValues for this Option
selectedValue - the value that was selected by the user, if any
serialized - a String containing a saved WProperties
See Also:
WProperties

Option

public Option(String serialized)
Create an Option from its serialized version.

Parameters:
serialized - a String containing a saved WProperties
See Also:
WProperties
Method Detail

getFirstValue

public String getFirstValue()

startIterator

public void startIterator()

hasMoreValues

public boolean hasMoreValues()

getNextValue

public String getNextValue()

_getValue

protected String _getValue(int order)

getPriceType

public char getPriceType(Product p)

getPrice

public double getPrice(Product p)

toString

public String toString()
Creates a String representation of this Option that contains all information about the Option. Use this when communicating from server to client.

Overrides:
toString in class Object

toShortString

public String toShortString()
Creates a String representation of this Option that contains only the essential information for the server-side to work with. Use this when sending data from client to server.



Copyright © 1997-2008 Aduna. All Rights Reserved.