1 18 19 package de.gulden.framework.amoda.generic.option; 20 21 import de.gulden.framework.amoda.generic.data.*; 22 import de.gulden.framework.amoda.model.data.*; 23 import de.gulden.framework.amoda.model.option.*; 24 import de.gulden.framework.amoda.model.option.OptionChoice; 25 import java.lang.*; 26 import java.util.*; 27 28 34 public class GenericOptionChoice extends GenericOptions implements OptionChoice { 35 36 40 public GenericOptionChoice() { 41 } 43 44 45 49 public OptionEntry getSelectedOption() { 50 for (Iterator it=getEntries().values().iterator();it.hasNext();) { 51 OptionEntry o=(OptionEntry)it.next(); 52 if (o.getValue().getBoolean()==true) { 53 return o; 54 } 55 } 56 return null; 57 } 58 59 public String getSelectedId() { 60 OptionEntry o=getSelectedOption(); 61 if (o!=null) { 62 return o.getId(); 63 } else { 64 return null; 65 } 66 } 67 68 public Value getValue() { 69 return null; 71 } 72 73 public Value getValue(int state) { 74 return null; 76 } 77 78 public Class getType() { 79 throw new AbstractMethodError ("getType() is not available on GenericOptionChoice"); 80 } 81 82 public String findTitle() { 83 return de.gulden.framework.amoda.generic.metadata.GenericMetadata.findTitle(this); } 85 86 } | Popular Tags |