Examples of Fixed


Examples of org.apache.schemas.yoko.bindings.corba.Fixed

    public void testReadWriteStaxFixed() {
        QName objName = new QName("object");
        QName objIdlType = new QName(staxTestNamespaceURI, "TestFixed", staxTestPrefix);
        CorbaTypeImpl type = CorbaUtils.getCorbaType(objIdlType, staxBindingImpl.getCorbaTypeMaps());
        assertTrue(type instanceof Fixed);
        Fixed fixedType = (Fixed)type;
        TypeCode objTypeCode = CorbaUtils.getTypeCode(orb, objIdlType, staxBindingImpl.getCorbaTypeMaps());
        CorbaFixedHandler obj = new CorbaFixedHandler(objName, objIdlType, objTypeCode, fixedType);
        assertNotNull(obj);

        java.math.BigDecimal fixedValue = new java.math.BigDecimal("12345.67");
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Fixed

                mappingType.getStructOrExceptionOrUnion().add(structType);
            } else if (currentNode.getNodeName().equals("corba:exception")) {
                Exception exceptType = getExceptionDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(exceptType);
            } else if (currentNode.getNodeName().equals("corba:fixed")) {
                Fixed fixedType = getFixedDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(fixedType);
            } else if (currentNode.getNodeName().equals("corba:union")) {
                Union unionType = getUnionDefinition(currentNode, def);
                mappingType.getStructOrExceptionOrUnion().add(unionType);
            } else if (currentNode.getNodeName().equals("corba:alias")) {
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Fixed

        }
        return exceptType;
    }

    public Fixed getFixedDefinition(Node node, Definition def) {
        Fixed fixedType = new Fixed();

        // Store information about the fixed type
        NamedNodeMap fixedAttributes = node.getAttributes();
        for (int i = 0; i < fixedAttributes.getLength(); ++i) {
            if (fixedAttributes.item(i).getNodeName().equals("name")) {
                fixedType.setName(fixedAttributes.item(i).getNodeValue());
            } else if (fixedAttributes.item(i).getNodeName().equals("repositoryID")) {
                fixedType.setRepositoryID(fixedAttributes.item(i).getNodeValue());
            } else if (fixedAttributes.item(i).getNodeName().equals("digits")) {
                fixedType.setDigits(new Long(fixedAttributes.item(i).getNodeValue()));
            } else if (fixedAttributes.item(i).getNodeName().equals("scale")) {
                fixedType.setScale(new Long(fixedAttributes.item(i).getNodeValue()));
            }
        }
        return fixedType;
    }
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Fixed

        return idlType;
    }
   
    private IdlType createFixed(CorbaTypeImpl ctype, IdlScopeBase scope, String local) {
        IdlType idlType = null;
        Fixed f = (Fixed)ctype;    
        Long digits = f.getDigits();
        Long scale = f.getScale();       
        idlType = IdlFixed.create(scope, local, digits.intValue(),  
                                  scale.intValue());
        scope.addToScope(idlType);
        return idlType;
    }
View Full Code Here

Examples of org.apache.schemas.yoko.bindings.corba.Fixed

                                              getTypeCode(orb, member.getIdltype(), typeMaps), null);
            }
            String name = exceptType.getName();
            tc = orb.create_exception_tc(exceptType.getRepositoryID(), name, members);
        } else if (obj instanceof Fixed) {
            Fixed fixedType = (Fixed) obj;
            tc = orb.create_fixed_tc((short) fixedType.getDigits(), (short) fixedType.getScale());
        } else if (obj instanceof Sequence) {
            Sequence seqType = (Sequence)obj;
            tc = orb.create_sequence_tc((int) seqType.getBound(),
                                        getTypeCode(orb, seqType.getElemtype(), typeMaps));
        } else if (obj instanceof Struct) {
View Full Code Here

Examples of org.hibernate.test.legacy.Fixed

  }

  public void testBroken() throws Exception {
    Session s = openSession();
    Transaction t = s.beginTransaction();
    Broken b = new Fixed();
    b.setId( new Long(123));
    b.setOtherId("foobar");
    s.save(b);
    s.flush();
    b.setTimestamp( new Date() );
    t.commit();
    s.close();

    s = openSession();
    t = s.beginTransaction();
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.