Examples of RequestTypeWithOptions


Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

   
    @Override
    // org.dmd.dms.util.GenUtility.dumpSETType(GenUtility.java:2659)
    public RequestTypeWithOptions add(Object v) throws DmcValueException {
        synchronized(this){
            RequestTypeWithOptions rc = typeCheck(v);
            if (value == null)
                initValue();
       
            // If false is returned, we didn't modify the set, so return null
            if (!value.add(rc))
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

   
    @Override
    // org.dmd.dms.util.GenUtility.dumpSETType(GenUtility.java:2676)
    public RequestTypeWithOptions del(Object v){
        synchronized(this){
            RequestTypeWithOptions rc = null;
            if (value == null)
                return(rc);
           
            try {
                rc = typeCheck(v);
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

        synchronized(this){
            if (value == null)
                return(false);
           
            try {
                RequestTypeWithOptions val = typeCheck(v);
                return(value.contains(val));
            } catch (DmcValueException e) {
                return(false);
            }
        }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

   
    @Override
    // org.dmd.dms.util.GenUtility.dumpMVType(GenUtility.java:2363)
    public RequestTypeWithOptions add(Object v) throws DmcValueException {
        synchronized(this){
            RequestTypeWithOptions rc = typeCheck(v);
            if (value == null)
                value = new ArrayList<RequestTypeWithOptions>();
            value.add(rc);
            return(rc);
        }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

    public RequestTypeWithOptions del(Object v){
        synchronized(this){
            if (value == null)
                return(null);
   
            RequestTypeWithOptions key = null;
            RequestTypeWithOptions rc = null;
            try {
                key = typeCheck(v);
            } catch (DmcValueException e) {
                throw(new IllegalStateException("Incompatible type passed to del():" + getName(),e));
            }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

                throw(new IllegalStateException("Attribute: " + getAttributeInfo().name + " is not indexed. You can't use setMVnth()."));
           
            if ( (index < 0) || (index >= getAttributeInfo().indexSize))
                throw(new IllegalStateException("Index " + index + " for attribute: " + getAttributeInfo().name + " is out of range: 0 <= index < " + getAttributeInfo().indexSize));
           
            RequestTypeWithOptions rc = null;
           
            if (v != null)
                rc = typeCheck(v);
           
            if (value == null){
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

        synchronized(this){
            if (value == null)
                return(false);

            try {
                RequestTypeWithOptions val = typeCheck(v);
                return(value.contains(val));
            } catch (DmcValueException e) {
                return(false);
            }
        }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

    }
   
    @Override
    // org.dmd.dms.util.GenUtility.dumpSVType(GenUtility.java:2010)
    public RequestTypeWithOptions set(Object v) throws DmcValueException {
        RequestTypeWithOptions rc = typeCheck(v);
        // We only return a value if the value actually changed. This supports
        // the applyModifier() mechanism on DmcObject where we only return true
        // if something changed as a result of the modifier
        if (value == null)
            value = rc;
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

public class RequestTypeWithOptionsTest {

  @SuppressWarnings("unused")
  @Test
  public void testToowFewTokens(){
    RequestTypeWithOptions rt = null;
   
    try {
      rt = new RequestTypeWithOptions("junk");
      assertTrue("Should have indicated too few tokens.", false);     
    } catch (DmcValueException e) {
      System.out.println("Expected exception: " + e.toString());
    }
  }
View Full Code Here

Examples of org.dmd.mvw.tools.mvwgenerator.types.RequestTypeWithOptions

    }
  }

  @Test
  public void testTypeAndFunction() throws DmcValueException{
    RequestTypeWithOptions rt = null;
   
    rt = new RequestTypeWithOptions("SetRequest setContact Contact");
    assertEquals("Request type should be Set", "Set", rt.getRequestType());     
    assertEquals("Function should be setContact", "setContact", rt.getFunctionName());     
    assertEquals("Class name should be Contact", "Contact", rt.getClassName());     
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.