-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: The incoming tabular data stream (TDS) remote procedure call
PostPosted: Wed Mar 02, 2011 11:53 am 
Newbie

Joined: Tue Mar 01, 2011 8:22 pm
Posts: 1
Hi

This exception is driving me crazy and I can't find the cause. I'm triying to load (with a Hibernate criteria query) an object that has reference to another one. I have a TraderPortfolioStaticRanking object whis is related to a table, this object has a reference to a Security object (one to many relationship), the problem is not with the TraderPortfolioStaticRanking but with the Security one. I hope someone could help me please

[color=#BF0000][color=#BF0000][2/03/11 00:08:46:855 GMT] 00000025 operator E org.apache.commons.logging.impl.Jdk14Logger error null
org.hibernate.exception.GenericJDBCException: could not load an entity: [com.yax.rd.securities.businessentities.Security#976]
at com.yax.rd.portfolio.ejb.impl.TraderPortfolioStaticRankingMaintenanceBean.getAllStaticRankingForSecurity(TraderPortfolioStaticRankingMaintenanceBean.java:291)
at com.yax.rd.portfolio.ejb.interfaces.EJSLocalStatelessTraderPortfolioStaticRankingMain_b8a184f8.getAllStaticRankingForSecurity(EJSLocalStatelessTraderPortfolioStaticRankingMain_b8a184f8.java:219)
at com.yax.rd.operator.ejb.impl.RDOperatorFacadeBean.getAllStaticRankingForSecurity(RDOperatorFacadeBean.java:316)
at com.yax.rd.operator.ejb.interfaces.EJSLocalStatelessRDOperatorFacade_265fafd8.getAllStaticRankingForSecurity(EJSLocalStatelessRDOperatorFacade_265fafd8.java:1373)
at com.yax.rd.operator.businessdelegate.RDOperatorBusinessDelegate.getAllStaticRankingForSecurity(RDOperatorBusinessDelegate.java:478)
at com.yax.rd.portfolio.web.TraderPortfolioStaticRankingEditComponent.getTraderPortfolioStaticRankingAllValueObject(TraderPortfolioStaticRankingEditComponent.java:96)
at com.yax.rd.portfolio.web.TraderPortfolioStaticRankingEditComponent.updateFields(TraderPortfolioStaticRankingEditComponent.java:155)
at com.yax.rd.portfolio.web.TraderPortfolioStaticRankingEditComponent.updateFieldsFrom(TraderPortfolioStaticRankingEditComponent.java:145)
at com.lumina.tapestry.yax.editpage.EditPage.updateFieldsFrom(EditPage.java:71)
at com.lumina.tapestry.yax.dataset.YAXDataset.updateCurrentObject(YAXDataset.java:305)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.apache.tapestry.listener.ListenerMap.invokeTargetMethod(ListenerMap.java:257)
at org.apache.tapestry.listener.ListenerMap.access$100(ListenerMap.java:46)
at org.apache.tapestry.listener.ListenerMap$SyntheticListener.invoke(ListenerMap.java:97)
at org.apache.tapestry.listener.ListenerMap$SyntheticListener.actionTriggered(ListenerMap.java:102)
at org.apache.tapestry.link.DirectLink.trigger(DirectLink.java:119)
at org.apache.tapestry.engine.DirectService.service(DirectService.java:169)
at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:872)
at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197)
at com.yax.web.PresentationLayerServlet.doService(PresentationLayerServlet.java:126)
at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:158)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1087)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:837)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:680)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:588)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
Caused by: org.hibernate.exception.GenericJDBCException: could not load an entity: [com.yax.rd.securities.businessentities.Security#976]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1899)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:71)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:65)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3062)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:434)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:415)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:165)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:207)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:906)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:874)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:590)
at org.hibernate.type.EntityType.resolve(EntityType.java:412)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877)
at org.hibernate.loader.Loader.doQuery(Loader.java:752)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2232)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
at org.hibernate.loader.Loader.list(Loader.java:2124)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at com.yax.rd.portfolio.ejb.impl.TraderPortfolioStaticRankingMaintenanceBean.getAllStaticRankingForSecurityOID(TraderPortfolioStaticRankingMaintenanceBean.java:307)
at com.yax.rd.portfolio.ejb.impl.TraderPortfolioStaticRankingMaintenanceBean.access$2(TraderPortfolioStaticRankingMaintenanceBean.java:296)
at com.yax.rd.portfolio.ejb.impl.TraderPortfolioStaticRankingMaintenanceBean$3.block(TraderPortfolioStaticRankingMaintenanceBean.java:75)
at com.lumina.persistence.SessionCommand.execute(SessionCommand.java:60)
at com.yax.rd.portfolio.ejb.impl.TraderPortfolioStaticRankingMaintenanceBean.getAllStaticRankingForSecurity(TraderPortfolioStaticRankingMaintenanceBean.java:288)
... 48 more
Caused by: com.inet.tds.u: Msg 8016, Level 16, State 30, Line 1, Sqlstate 01000
[MXWMAPYAXS06\QSQL05YAX]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 3 (""): Data type 0xE7 has an invalid data length or metadata length.
at com.inet.tds.q.a(Unknown Source)
at com.inet.tds.as.b(Unknown Source)
at com.inet.tds.as.a(Unknown Source)
at com.inet.tds.be.a(Unknown Source)
at com.inet.tds.be.b(Unknown Source)
at com.inet.tds.bc.g(Unknown Source)
at com.inet.tds.bc.executeQuery(Unknown Source)
at com.inet.pool.aa.executeQuery(Unknown Source)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteQuery(WSJdbcPreparedStatement.java:1011)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java:661)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1812)
at org.hibernate.loader.Loader.doQuery(Loader.java:697)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1885)
... 77 more
[/color][/color]


My mapping file


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping
>
<class
name="com.yax.rd.securities.businessentities.Security"
table="SECURITY"
lazy="false"
dynamic-update="false"
dynamic-insert="false"
select-before-update="false"
optimistic-lock="version"
>

<id
name="OID"
column="OID"
type="java.lang.Long"
>
<generator class="native">
<!--
To add non XDoclet generator parameters, create a file named
hibernate-generator-params-Security.xml
containing the additional parameters and place it in your merge dir.
-->
</generator>
</id>

<timestamp
name="modificationTimestamp"
column="MODIFICATION_TIMESTAMP"
/>

<property
name="creationTimestamp"
type="java.sql.Timestamp"
update="true"
insert="true"
access="property"
column="CREATION_TIMESTAMP"
not-null="true"
/>

<property
name="creationUserId"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="CREATION_USER_ID"
length="20"
not-null="true"
/>

<property
name="modificationUserId"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="MODIFICATION_USER_ID"
length="20"
not-null="true"
/>

<property
name="modificationIPAddress"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="MODIFICATION_IP_ADDRESS"
length="20"
not-null="true"
/>

<property
name="creationIPAddress"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="CREATION_IP_ADDRESS"
length="20"
not-null="true"
/>

<property
name="name"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="NAME"
length="50"
not-null="true"
/>

<property
name="nasdaqId"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="NASDAQ_ID"
length="5"
not-null="false"
/>

<property
name="sedolId"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="SEDOL_ID"
length="7"
not-null="true"
unique="true"
/>

<property
name="mlpfs"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="MLPFS"
length="5"
not-null="true"
unique="true"
/>

<property
name="isinId"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="ISIN_ID"
length="12"
not-null="false"
/>

<property
name="autexId"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="AUTEX_ID"
length="6"
not-null="false"
/>

<property
name="ricId"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="RIC_ID"
length="15"
not-null="false"
/>

<property
name="isActive"
type="java.lang.Boolean"
update="true"
insert="true"
access="property"
column="ACTIVE"
not-null="true"
/>

<property
name="allowForeignClient"
type="java.lang.Boolean"
update="true"
insert="true"
access="property"
column="FOREIGN_CLIENTS"
not-null="true"
/>

<many-to-one
name="issuer"
class="com.yax.rd.securities.businessentities.Issuer"
cascade="none"
outer-join="auto"
update="true"
insert="true"
access="property"
column="ISSUER"
not-null="true"
/>

<property
name="issuerId"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="ISSUER_ID"
length="10"
not-null="true"
/>

<many-to-one
name="currency"
class="com.yax.rd.core.businessentities.Currency"
cascade="none"
outer-join="auto"
update="true"
insert="true"
access="property"
column="CURRENCY"
not-null="true"
/>

<many-to-one
name="securityClass"
class="com.yax.rd.securities.businessentities.SecurityClass"
cascade="none"
outer-join="auto"
update="true"
insert="true"
access="property"
column="SECURITY_CLASS"
not-null="true"
/>

<property
name="securityClassId"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="SECURITY_CLASS_ID"
length="6"
not-null="true"
/>

<property
name="securityClassification"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="SE_CLASSIFICATION"
length="1"
not-null="true"
/>

<property
name="couponNumber"
type="java.lang.Long"
update="true"
insert="true"
access="property"
column="COUPON_NUMBER"
not-null="true"
/>

<property
name="internationalArbitrage"
type="java.lang.Boolean"
update="true"
insert="true"
access="property"
column="INTERNATIONAL_ARBITRAGE"
not-null="true"
/>


<property
name="marketPrice"
type="java.math.BigDecimal"
update="true"
insert="true"
access="property"
>
<column
name="MARKET_PRICE"
not-null="false"
sql-type="numeric (20,10)"
/>
</property>


<!--
<property
name="marketPrice"
type="java.math.BigDecimal"
update="true"
insert="true"
access="property"
column="MARKET_PRICE"
not-null="false"
/>
-->

<property
name="marketType"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="MARKET_TYPE"
length="1"
not-null="true"
/>

<property
name="isSentra"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="IS_SENTRA"
length="1"
not-null="false"
/>

<property
name="derivativesIssuer"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="DERIVATIVES_ISSUER"
length="6"
not-null="false"
/>

<property
name="derivativesSecurityClass"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="DERIVATIVES_SECURITY_CLASS"
length="4"
not-null="false"
/>

<many-to-one
name="valueTypeBMV"
class="com.yax.rd.core.businessentities.ValueType"
cascade="none"
outer-join="auto"
update="true"
insert="true"
access="property"
column="VALUE_TYPE_BMV"
not-null="true"
/>

<many-to-one
name="valueTypeCNBV"
class="com.yax.rd.core.businessentities.ValueType"
cascade="none"
outer-join="auto"
update="true"
insert="true"
access="property"
column="VALUE_TYPE_CNBV"
not-null="true"
/>

<property
name="tradingDate"
type="java.sql.Timestamp"
update="true"
insert="true"
access="property"
column="TRADING_DATE"
not-null="false"
/>

<property
name="cnbvID"
type="java.lang.String"
update="true"
insert="true"
access="property"
column="CNBV_ID"
length="3"
not-null="true"
/>

<property
name="securityVolume"
type="java.lang.Long"
update="true"
insert="true"
access="property"
column="SECURITY_VOLUME"
not-null="false"
/>

<property
name="brokerageHousePosition"
type="java.lang.Long"
update="true"
insert="true"
access="property"
column="BROKERAGE_HOUSE_POSITION"
not-null="false"
/>

<property
name="shareCapital"
type="java.lang.Long"
update="true"
insert="true"
access="property"
column="SHARE_CAPITAL"
not-null="false"
/>

<property
name="isShortSale"
type="java.lang.Boolean"
update="true"
insert="true"
access="property"
column="SHORT_SALE"
not-null="true"
/>


<property
name="nominalValue"
type="java.math.BigDecimal"
update="true"
insert="true"
access="property"
>
<column
name="NOMINAL_VALUE"
not-null="false"
sql-type="numeric (11,6)"
/>
</property>

<!--
<property
name="nominalValue"
type="java.math.BigDecimal"
update="true"
insert="true"
access="property"
column="NOMINAL_VALUE"
not-null="false"
/>
-->

<property
name="lastModificationNumber"
type="java.lang.Long"
update="true"
insert="true"
access="property"
column="LAST_MODIF_NUMBER"
not-null="true"
/>

<property
name="authorizedForFM"
type="java.lang.Boolean"
update="true"
insert="true"
access="property"
column="AUTHORIZED_FOR_FM"
not-null="true"
/>

<property
name="isRepresentative"
type="java.lang.Boolean"
update="true"
insert="true"
access="property"
column="IS_REPRESENTATIVE"
not-null="true"
/>

<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-Security.xml
containing the additional properties and place it in your merge dir.
-->

</class>

</hibernate-mapping>

POJO FIle

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;

import com.lumina.persistence.PersistentObject;
import com.yax.rd.core.businessentities.Currency;
import com.yax.rd.core.businessentities.ValueType;

/**
* @author mespinosa |||>> update : Errol Alberto Alvarez Rubio SRS Formador de Mercado
*
* @hibernate.class
* table="SECURITY"
*/
public class Security implements PersistentObject {

//BUSINESS MODEL CONSTANTS
public static final String DEFAULT_VALUE_TYPE_SIC_BMV = "1A";
public static final String DEFAULT_VALUE_TYPE_SIC_CNBV = "1ASP";
public static final String DEFAULT_VALUE_TYPE_BROKERAGE_BMV = "3";
public static final String DEFAULT_VALUE_TYPE_BROKERAGE_CNBV="V11";

//CONSTANTS
public static final String ISSUER= "issuer";
public static final String ISSUER_ID = "issuerId";
public static final String SECURITY_CLASS= "securityClass";
public static final String SECURITY_CLASS_ID = "securityClassId";
public static final String KEY_MLPFS = "mlpfs";
public static final String KEY_NASDAQ_ID = "nasdaqId";
public static final String KEY_SEDOL_ID = "sedolId";

// PERSISTENT ATTRIBUTES
private Long oid;
private Timestamp creationTimestamp;
private Timestamp modificationTimestamp;
private String creationUserId;
private String modificationUserId;
private String creationIPAddress;
private String modificationIPAddress;

// MODEL VARIABLES
private String name;
private String nasdaqId;
private String sedolId;
private String mlpfs;
private String isinId;
private String autexId;
private String ricId;
private Boolean isActive;
private Boolean allowForeignClient;
private Issuer issuer;
private String issuerId;
private Currency currency;
private SecurityClass securityClass;
private String securityClassId;
private String securityClassification;
private Long couponNumber;

private Boolean internationalArbitrage;
private String marketType;
private String isSentra;
private String derivativesIssuer;
private String derivativesSecurityClass;
private ValueType valueTypeBMV;
private ValueType valueTypeCNBV;
private Timestamp tradingDate;
private String cnbvID;
private BigDecimal marketPrice;
private Long securityVolume;
private Long brokerageHousePosition;
private Long shareCapital;
private Boolean isShortSale;
private BigDecimal nominalValue;
private Long lastModificationNumber = new Long(0);
private Boolean authorizedForFM;
private Boolean isRepresentative;


// METHODS
/**
* Constructor
*/
public Security() {
super();
}

/**
* @hibernate.id
* column = "OID"
* generator-class = "native"
*/
public Long getOID() {
return oid;
}

public void setOID(Long newOID) {
oid = newOID;
}

/**
* @hibernate.property
* column = "CREATION_TIMESTAMP"
* not-null = "true"
*/
public Timestamp getCreationTimestamp() {
return creationTimestamp;
}

public void setCreationTimestamp(Timestamp newCreationTimestamp) {
creationTimestamp = newCreationTimestamp;
}

/**
* @hibernate.timestamp
* column = "MODIFICATION_TIMESTAMP"
*/
public Timestamp getModificationTimestamp() {
return modificationTimestamp;
}

public void setModificationTimestamp(Timestamp newModificationTimestamp) {
modificationTimestamp = newModificationTimestamp;
}

/**
* @hibernate.property
* column = "CREATION_USER_ID"
* length = "20"
* not-null = "true"
*/
public String getCreationUserId() {
return creationUserId;
}

public void setCreationUserId(String userId) {
creationUserId = userId;
}

/**
* @hibernate.property
* column = "MODIFICATION_USER_ID"
* length = "20"
* not-null = "true"
*/
public String getModificationUserId() {
return modificationUserId;
}

public void setModificationUserId(String userId) {
modificationUserId = userId;
}

/**
* @hibernate.property
* column = "MODIFICATION_IP_ADDRESS"
* length = "20"
* not-null = "true"
*/
public String getModificationIPAddress() {
return modificationIPAddress;
}
public void setModificationIPAddress(String newIPAddress) {
modificationIPAddress = newIPAddress;
}

/**
* @hibernate.property
* column = "CREATION_IP_ADDRESS"
* length = "20"
* not-null = "true"
*/
public String getCreationIPAddress() {
return creationIPAddress;
}
public void setCreationIPAddress(String newIPAddress) {
creationIPAddress = newIPAddress;
}

/**
* @hibernate.property
* column = "NAME"
* length = "50"
* not-null = "true"
*/
public String getName() {
return name;
}

public void setName(String string) {
name = string;
}

/**
* @hibernate.property
* column = "NASDAQ_ID"
* length = "5"
* not-null = "false"
*/
public String getNasdaqId() {
return nasdaqId;
}

public void setNasdaqId(String string) {
nasdaqId = string;
}

/**
* @hibernate.property
* column = "SEDOL_ID"
* length = "7"
* not-null = "true"
* unique = "true"
*/
public String getSedolId() {
return sedolId;
}

public void setSedolId(String string) {
sedolId = string;
}

/**
* @hibernate.property
* column = "MLPFS"
* length = "5"
* not-null = "true"
* unique = "true"
*/
public String getMlpfs() {
return mlpfs;
}

public void setMlpfs(String string) {
mlpfs = string;
}

/**
* @hibernate.property
* column = "ISIN_ID"
* length = "12"
* not-null = "false"
*/
public String getIsinId() {
return isinId;
}

public void setIsinId(String string) {
isinId = string;
}

/**
* @hibernate.property
* column = "AUTEX_ID"
* length = "6"
* not-null = "false"
*/
public String getAutexId() {
return autexId;
}

public void setAutexId(String string) {
autexId = string;
}

/**
* @hibernate.property
* column = "RIC_ID"
* length = "15"
* not-null = "false"
*/
public String getRicId() {
return ricId;
}

public void setRicId(String string) {
ricId = string;
}

/**
* @hibernate.property
* column = "ACTIVE"
* not-null = "true"
*/
public Boolean getIsActive() {
return isActive;
}

public boolean isActive() {
return this.getIsActive().booleanValue();
}

public void setIsActive(Boolean boolean1) {
isActive = boolean1;
}

/**
* @hibernate.property
* column = "FOREIGN_CLIENTS"
* not-null = "true"
*/
public Boolean getAllowForeignClient() {
return allowForeignClient;
}

public boolean allowForeignClient() {
return this.getAllowForeignClient().booleanValue();
}

public void setAllowForeignClient(Boolean boolean1) {
allowForeignClient = boolean1;
}


/**
* @hibernate.many-to-one
* class = "com.yax.rd.securities.businessentities.Issuer"
* column = "ISSUER"
* not-null = "true"
*/
public Issuer getIssuer() {
return issuer;
}

public void setIssuer(Issuer issuer) {
this.issuer = issuer;
}

/**
* @hibernate.property
* column = "ISSUER_ID"
* not-null = "true"
* length = "10"
*/
public String getIssuerId() {
return issuerId;
}

public void setIssuerId(String issuer) {
this.issuerId = issuer;
}

/**
* @hibernate.many-to-one
* class = "com.yax.rd.core.businessentities.Currency"
* column = "CURRENCY"
* not-null = "true"
*/
public Currency getCurrency() {
return currency;
}

public void setCurrency(Currency currency) {
this.currency = currency;
}


/**
* @hibernate.many-to-one
* class = "com.yax.rd.securities.businessentities.SecurityClass"
* column = "SECURITY_CLASS"
* not-null = "true"
*/
public SecurityClass getSecurityClass() {
return securityClass;
}

public void setSecurityClass(SecurityClass class1) {
securityClass = class1;
}

/**
* @hibernate.property
* column = "SECURITY_CLASS_ID"
* not-null = "true"
* length = "6"
*/
public String getSecurityClassId() {
return securityClassId;
}

public void setSecurityClassId(String securityClass) {
securityClassId = securityClass;
}

/**
* @hibernate.property
* column = "SE_CLASSIFICATION"
* length = "1"
* not-null = "true"
*/
public String getSecurityClassification() {
return securityClassification;
}

public void setSecurityClassification(String string) {
securityClassification = string;
}

/**
* @hibernate.property
* column = "COUPON_NUMBER"
* not-null = "true"
*/
public Long getCouponNumber() {
return couponNumber;
}

public void setCouponNumber(Long value) {
couponNumber = value;
}

/**
* @hibernate.property
* column = "INTERNATIONAL_ARBITRAGE"
* not-null="true"
* */
public Boolean getInternationalArbitrage() {
return internationalArbitrage;
}
public void setInternationalArbitrage(Boolean boolean1) {
internationalArbitrage = boolean1;
}

/**
* @hibernate.property
* @hibernate.column name = "MARKET_PRICE" sql-type = "numeric (20,10)" not-null="false"
*
*/
public BigDecimal getMarketPrice() {
return marketPrice;
}
public void setMarketPrice(BigDecimal decimal) {
marketPrice = decimal;
}


/**
* @hibernate.property
* column = "MARKET_TYPE"
* not-null = "true"
* length = "1"
* */
public String getMarketType() {
return marketType;
}
public void setMarketType(String string) {
marketType = string;
}

/**
* @hibernate.property
* column = "IS_SENTRA"
* not-null= "false"
* length = "1"
* */

public String getIsSentra() {
return isSentra;
}
public void setIsSentra(String string) {
isSentra = string;
}

/**
* @hibernate.property
* column="DERIVATIVES_ISSUER"
* not-null="false"
* length="6"
* */
public String getDerivativesIssuer() {
return derivativesIssuer;
}
public void setDerivativesIssuer(String string) {
derivativesIssuer = string;
}

/**
* @hibernate.property
* column = "DERIVATIVES_SECURITY_CLASS"
* not-null="false"
* length = "4"
*
* */
public String getDerivativesSecurityClass() {
return derivativesSecurityClass;
}
public void setDerivativesSecurityClass(String string) {
derivativesSecurityClass = string;
}

/**
* @hibernate.many-to-one
* class = "com.yax.rd.core.businessentities.ValueType"
* column = "VALUE_TYPE_BMV"
* not-null = "true"
*/
public ValueType getValueTypeBMV() {
return valueTypeBMV;
}

public void setValueTypeBMV(ValueType valType) {
valueTypeBMV = valType;
}

/**
* @hibernate.many-to-one
* class = "com.yax.rd.core.businessentities.ValueType"
* column="VALUE_TYPE_CNBV"
* not-null = "true"
*
*/
public ValueType getValueTypeCNBV() {
return valueTypeCNBV;
}
public void setValueTypeCNBV(ValueType valType) {
valueTypeCNBV = valType;
}

/**
* @hibernate.property
* column = "TRADING_DATE"
* not-null="false"
*/
public Timestamp getTradingDate() {
return tradingDate;
}
public void setTradingDate(Timestamp date) {
tradingDate = date;
}

public void setTradingDate(Date date) {
this.setTradingDate(new Timestamp(date.getTime()));
}


/**
* @hibernate.property
* column = "CNBV_ID"
* not-null="true"
* length = "3"
* */
public String getCnbvID() {
return cnbvID;
}
public void setCnbvID(String string) {
cnbvID = string;
}



/**
* @hibernate.property
* column = "SECURITY_VOLUME"
* not-null="false"
*/
public Long getSecurityVolume() {
return securityVolume;
}
public void setSecurityVolume(Long value) {
securityVolume = value;
}

/**
* @hibernate.property
* column = "BROKERAGE_HOUSE_POSITION"
* not-null="false"
* */
public Long getBrokerageHousePosition() {
return brokerageHousePosition;
}

public void setBrokerageHousePosition(Long value) {
brokerageHousePosition = value;
}


/**
* @hibernate.property
* column="SHARE_CAPITAL"
* not-null="false"
*/
public Long getShareCapital() {
return shareCapital;
}
public void setShareCapital(Long value) {
shareCapital = value;
}

/**
* @hibernate.property
* column = "SHORT_SALE"
* not-null = "true"
*/
public Boolean getIsShortSale() {
return isShortSale;
}
public void setIsShortSale(Boolean boolean1) {
isShortSale = boolean1;
}

/**
* @hibernate.property
* @hibernate.column name = "NOMINAL_VALUE" sql-type = "numeric (11,6)" not-null="false"
*
*/
public BigDecimal getNominalValue() {
return nominalValue;
}
public void setNominalValue(BigDecimal decimal) {
nominalValue = decimal;
}

/**
* @hibernate.property
* column = "LAST_MODIF_NUMBER"
* not-null = "true"
* */
public Long getLastModificationNumber(){
return lastModificationNumber;
}
public void setLastModificationNumber(Long number){
lastModificationNumber = number;
}



/**
* @hibernate.property
* column = "AUTHORIZED_FOR_FM"
* not-null="true"
* */
public Boolean getAuthorizedForFM() {
return authorizedForFM;
}

public void setAuthorizedForFM(Boolean boolean1) {
authorizedForFM = boolean1;
}

/**
* @hibernate.property
* column = "IS_REPRESENTATIVE"
* not-null="true"
* */
public Boolean getIsRepresentative() {
return isRepresentative;
}

public void setIsRepresentative(Boolean isRepresentative) {
this.isRepresentative = isRepresentative;
}


}



TABLE SCRIPT

CREATE TABLE [ml].[SECURITY](
[OID] [numeric](19, 0) IDENTITY(1,1) NOT NULL,
[MODIFICATION_TIMESTAMP] [datetime] NOT NULL,
[CREATION_TIMESTAMP] [datetime] NOT NULL,
[CREATION_USER_ID] [nvarchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MODIFICATION_USER_ID] [nvarchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MODIFICATION_IP_ADDRESS] [nvarchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CREATION_IP_ADDRESS] [nvarchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[NAME] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[NASDAQ_ID] [nvarchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SEDOL_ID] [nvarchar](7) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MLPFS] [nvarchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ISIN_ID] [nvarchar](12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AUTEX_ID] [nvarchar](6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RIC_ID] [nvarchar](15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ACTIVE] [tinyint] NOT NULL,
[FOREIGN_CLIENTS] [tinyint] NOT NULL,
[ISSUER] [numeric](19, 0) NOT NULL,
[ISSUER_ID] [nvarchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CURRENCY] [numeric](19, 0) NOT NULL,
[SECURITY_CLASS] [numeric](19, 0) NOT NULL,
[SECURITY_CLASS_ID] [nvarchar](6) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[SE_CLASSIFICATION] [nvarchar](1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[COUPON_NUMBER] [numeric](19, 0) NOT NULL,
[INTERNATIONAL_ARBITRAGE] [tinyint] NOT NULL,
[MARKET_PRICE] [numeric](20, 10) NULL,
[MARKET_TYPE] [nvarchar](1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[IS_SENTRA] [nvarchar](1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DERIVATIVES_ISSUER] [nvarchar](6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DERIVATIVES_SECURITY_CLASS] [nvarchar](4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VALUE_TYPE_BMV] [numeric](19, 0) NOT NULL,
[VALUE_TYPE_CNBV] [numeric](19, 0) NOT NULL,
[TRADING_DATE] [datetime] NULL,
[CNBV_ID] [nvarchar](3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[SECURITY_VOLUME] [numeric](19, 0) NULL,
[BROKERAGE_HOUSE_POSITION] [numeric](19, 0) NULL,
[SHARE_CAPITAL] [numeric](19, 0) NULL,
[SHORT_SALE] [tinyint] NOT NULL,
[NOMINAL_VALUE] [numeric](11, 6) NULL,
[LAST_MODIF_NUMBER] [numeric](19, 0) NOT NULL,
[AUTHORIZED_FOR_FM] [tinyint] NOT NULL CONSTRAINT [DF__SECURITY__AUTHOR__0758AB8A] DEFAULT ((0)),
[IS_REPRESENTATIVE] [tinyint] NOT NULL,
CONSTRAINT [PK__SECURITY__047C3EDF] PRIMARY KEY CLUSTERED
(
[OID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY],
CONSTRAINT [UQ__SECURITY__05706318] UNIQUE NONCLUSTERED
(
[SEDOL_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY],
CONSTRAINT [UQ__SECURITY__06648751] UNIQUE NONCLUSTERED
(
[MLPFS] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
USE [YAX_DB_05]
GO
ALTER TABLE [ml].[SECURITY] WITH CHECK ADD CONSTRAINT [FK6738674050F1E011] FOREIGN KEY([CURRENCY])
REFERENCES [ml].[CURRENCY] ([OID])
GO
ALTER TABLE [ml].[SECURITY] WITH CHECK ADD CONSTRAINT [FK6738674075952A76] FOREIGN KEY([VALUE_TYPE_CNBV])
REFERENCES [ml].[VALUE_TYPE] ([OID])
GO
ALTER TABLE [ml].[SECURITY] WITH CHECK ADD CONSTRAINT [FK67386740814A66B9] FOREIGN KEY([ISSUER])
REFERENCES [ml].[ISSUER] ([OID])
GO
ALTER TABLE [ml].[SECURITY] WITH CHECK ADD CONSTRAINT [FK673867409E8E0B99] FOREIGN KEY([SECURITY_CLASS])
REFERENCES [ml].[SECURITY_CLASS] ([OID])
GO
ALTER TABLE [ml].[SECURITY] WITH CHECK ADD CONSTRAINT [FK67386740C0D0E14] FOREIGN KEY([VALUE_TYPE_BMV])
REFERENCES [ml].[VALUE_TYPE] ([OID])



JAVA CLASS

private TraderPortfolioStaticRankingMaintenanceAllValueObject getAllStaticRankingForSecurityOID(Long securityOID, Session dbSession) throws Exception {
Criteria criteria = dbSession.createCriteria(TraderPortfolioStaticRanking.class)
.add(Restrictions.eq(TraderPortfolioStaticRanking.SECURITY+"."+TraderPortfolioStaticRanking.OID_ATTRIBUTE,securityOID))
.addOrder(Order.asc(TraderPortfolioStaticRanking.RANKING));
List rankings = criteria.list();

ArrayList traderOperators = new ArrayList();
for (Iterator iter = rankings.iterator(); iter.hasNext();) {
TraderPortfolioStaticRanking element = (TraderPortfolioStaticRanking) iter.next();
traderOperators.add(element.getTraderOperator().getOID());
}

TraderPortfolioStaticRankingMaintenanceAllValueObject valueObject = new TraderPortfolioStaticRankingMaintenanceAllValueObject(null);
valueObject.setTraderOperators(traderOperators);
valueObject.setSecurityOIDs(new ArrayList());
valueObject.getSecurityOIDs().add(securityOID);
return valueObject;
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.