• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Need Help with Castor Mapping

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the following codes, could anyone tell me what's wrong with my code:

<mapping>
<class name="com.desjardins.vmd.disnatv.hub.messages.MfGetOrderInfoRp" auto-complete="false">
<map-to xml="mf-get-order-info-rp" />

<field name="requestId" type="java.lang.String" direct="false">
<bind-xml name="request-id" location="request-id" node="element" />
</field>
<field name="result" type="java.lang.Boolean" direct="false">
<bind-xml name="result" location="result" node="element" />
</field>
<field name="errorCode" type="java.lang.String" direct="false">
<bind-xml name="error-code" location="error-code" node="element" />
</field>
<field name="errorMessage" type="java.lang.String" direct="false">
<bind-xml name="error-message" location="error-message" node="element" />
</field>
<field name="status" type="java.lang.String" direct="false">
<bind-xml name="status" location="status" node="element" />
</field>


<field name="contracts" direct="false"
type="com.desjardins.vmd.disnatv.hub.messages.Contract"
collection="arraylist">
<bind-xml name="contracts" />
</field>

</class>


<class name="com.desjardins.vmd.disnatv.hub.messages.Contract">



<field name="tradeDateGmt" type="java.util.Date" direct="false">
<bind-xml name="trade-date-gmt" location="contract/trade-date-gmt" node="element" />
</field>
<field name="settlementDateGmt" type="java.util.Date" direct="false">
<bind-xml name="settlement-date-gmt" location="contract/settlement-date-gmt" node="element" />
</field>
<field name="grossAmount" type="java.math.BigDecimal" direct="false">
<bind-xml name="gross-amount" location="contract/gross-amount" node="element" />
</field>
<field name="fees" type="java.math.BigDecimal" direct="false">
<bind-xml name="fees" location="contract/fees" node="element" />
</field>
<field name="commissions" type="java.math.BigDecimal" direct="false">
<bind-xml name="commissions" location="contract/commissions" node="element" />
</field>
<field name="noOfShares" type="java.lang.Long" direct="false">
<bind-xml name="no-of-shares" location="contract/no-of-shares" node="element" />
</field>
<field name="sharePrice" type="java.math.BigDecimal" direct="false">
<bind-xml name="share-price" location="contract/share-price" node="element" />
</field>
<field name="net" type="java.math.BigDecimal" direct="false">
<bind-xml name="net" location="contract/net" node="element" />
</field>
<field name="contractStatus" type="java.lang.String" direct="false">
<bind-xml name="contract-status" location="contract/contract-status" node="element" />
</field>
<field name="errorMsg" type="java.lang.String" direct="false">
<bind-xml name="error-msg" location="contract/error-msg" node="element" />
</field>

</class>


</mapping>
public class MfGetOrderInfoRp {
//member variables
protected String _status;
protected ArrayList _contracts;

//default constructor
public MfGetOrderInfoRp(){
super();
}

/**
* @return Contract contract
*/
public ArrayList getContracts()
{
return _contracts;
}

/**
* @return String status
*/
public String getStatus()
{
return _status;
}

/**
* @param Contract contracts
*/
public void setContracts(ArrayList contracts)
{
_contracts = contracts;
}

/**
* @param string status
*/
public void setStatus(String status)
{
_status = status;
}

}

public class Contract
{
//member variables
protected Date _tradeDateGmt;
protected Date _settlementDateGmt;
protected BigDecimal _grossAmount;
protected BigDecimal _fees;
protected BigDecimal _commissions;
protected Long _noOfShares;
protected BigDecimal _sharePrice;
protected BigDecimal _net;
protected String _contractStatus;
protected String _errorMsg;

protected Contract _contract;

public Contract()
{
super();
}

/**
* @return String Commissions
*/
public BigDecimal getCommissions()
{
return _commissions;
}

/**
* @return String Contract Status
*/
public String getContractStatus()
{
return _contractStatus;
}

/**
* @return
*/
public String getErrorMsg()
{
return _errorMsg;
}

/**
* @return BigDecimal fees
*/
public BigDecimal getFees()
{
return _fees;
}

/**
* @return BigDecimal Gross Ammount
*/
public BigDecimal getGrossAmount()
{
return _grossAmount;
}

/**
* @return BigDecimal Net
*/
public BigDecimal getNet()
{
return _net;
}

/**
* @return Long Number Of Shares
*/
public Long getNoOfShares()
{
return _noOfShares;
}

/**
* @return Date Settlement Date Mgt
*/
public Date getSettlementDateGmt()
{
return _settlementDateGmt;
}

/**
* @return BigDecimal Share Price
*/
public BigDecimal getSharePrice()
{
return _sharePrice;
}

/**
* @return Date Trade Date Mgt
*/
public Date getTradeDateGmt()
{
return _tradeDateGmt;
}

/**
* @param BigDecimal commissions
*/
public void setCommissions(BigDecimal commissions)
{
_commissions = commissions;
}

/**
* @param string contractStatus
*/
public void setContractStatus(String contractStatus)
{
_contractStatus = contractStatus;
}

/**
* @param string errorMsg
*/
public void setErrorMsg(String errorMsg)
{
_errorMsg = errorMsg;
}

/**
* @param BigDecimal fees
*/
public void setFees(BigDecimal fees)
{
_fees = fees;
}

/**
* @param BigDecimal grossAmount
*/
public void setGrossAmount(BigDecimal grossAmount)
{
_grossAmount = grossAmount;
}

/**
* @param BigDecimal net
*/
public void setNet(BigDecimal net)
{
_net = net;
}

/**
* @param Long noOfShares
*/
public void setNoOfShares(Long noOfShares)
{
_noOfShares = noOfShares;
}

/**
* @param Date
*/
public void setSettlementDateGmt(Date settlementDateGmt)
{
_settlementDateGmt = settlementDateGmt;
}

/**
* @param BigDecimal sharePrice
*/
public void setSharePrice(BigDecimal sharePrice)
{
_sharePrice = sharePrice;
}

/**
* @param Date tradeDateMgt
*/
public void setTradeDateGmt(Date tradeDateGmt)
{
_tradeDateGmt = tradeDateGmt;
}

/**
* @return
*/
public Contract getContract()
{
return _contract;
}

/**
* @param contract
*/
public void setContracts(Contract contract)
{
_contract = contract;
}

}
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this thread to the Object Relational Mapping forum. Please continue this discussion there. Thank you
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic