Enlightensoft's Blog

Helping in your each step

  • Categories

  • Authors

jPub Object Generation Command

Posted by Pankil Patel on January 11, 2012

set path=%path%.;C:\oracle\product\10.2.0\client_1\BIN;

set classpath=%classpath%;.;C:\oracle\product\10.2.0\client_1\sqlj\lib\runtime12.jar;C:\oracle\product\10.2.0\client_1\sqlj\lib\translator.jar;C:\oracle\product\10.2.0\client_2\jdbc\lib\ojdbc14.jar;c:\xmlparserv2.jar;C:\oracle\product\10.2.0\client_1\sqlj\lib\runtime12ee

jpub -url=jdbc:oracle:thin:@devash-ibcmmu01.svr.us.jpmchase.net:15000/IBCMDA01.us.jpmchase.net -user=ECRM/ecrm_d1 -omit_schema_names -package=com.jpmorgan.ecrm.brokervote.vote.db.dto -sql=BV_OBJ_FIRM_ARRARY_TAB:ReFirmRankDBDto -tostring=true -dir=C:\jpub

Posted in Database, Oracle | Leave a Comment »

How to add where clouse into xml.hbm mapping file

Posted by Pankil Patel on November 13, 2011

For many-to-one:

<many-to-one name=”rankTypeLookupData”
formula=”(SELECT l.LKP_ID FROM EQ_LOOKUP_DATA l WHERE l.DROPDOWN_CODE = ‘BV_STAFF_RANK_TYPE’ AND l.LKP_KEY = INDVL_RANK_TYPE)”
class=”com.jpmorgan.ecrm.common.vo.LookupData” not-found=”ignore”>
<column name=”INDVL_RANK_TYPE” />
</many-to-one>

For one-to-many:

<set name=”regionList” table=”BV_REGION” cascade=”all” fetch=”join”
outer-join=”true” where=”DEL_IN = ‘N’” inverse=”true”>
<key column=”INDVL_RANK_ID” />
<one-to-many
class=”com.jpmorgan.ecrm.brokervote.common.vo.StaffTeamRankRegion” />
</set>

Posted in Hibernate | Leave a Comment »

Issue with createCriteria result set, class name appended by _$$_javassist_

Posted by Pankil Patel on November 8, 2011

Issue:  _$$_javassist_ is appended after class name, when you are using createCriteria(xyz.class) which have <set> or <bag> (one-to-many) relationship with Object that having <composite-id> instead of <id>.

Resolution: Instead of Using createCriteria(xyz.class), use EntityName for Criteria Query.

Ex: DetachedCriteria detachedCriteria = DetachedCriteria.forEntityName(“xyzSearch”);

Impact of Issue:

  1. For java, if you are using any code which have  comparison with class name it will fail in that case.
  2. If you are using any communication by RMI like: Spring BlazeDS for Flex & Java, It will not able to cast the Object in proper format & will give result in generics Object format.

Posted in Hibernate | Leave a Comment »

How to use sequence in ID tag of hbm.xml???

Posted by Pankil Patel on September 26, 2011

 

How to use sequence in ID tag of hbm.xml???

<id name=“id” type=“java.lang.Long” column=“ID”>

<generatorclass=“sequence”><paramname=“sequence”>BV_BROKER_TAG_STAFF_SEQ</param></generator>

</id>

Posted in Hibernate | Leave a Comment »

How to call store procedure or package in Hibernate???

Posted by Pankil Patel on September 26, 2011

How to call store procedure or package in Hibernate???

Please find attachment for the solution: StoreProcCallWithHibernate

Posted in Hibernate | Leave a Comment »

How to use Entity Name, specified in hbm.xml in DetachedCriteria???

Posted by Pankil Patel on September 26, 2011

 How to use Entity Name, specified in hbm.xml in DetachedCriteria???

OR

How to use OR Restriction in Criteria Query???

DetachedCriteria criteria = DetachedCriteria.forEntityName(“staff_phase2″);

Criterion crit1 = Restrictions.ilike(“lastName”, searchText.trim(), MatchMode.START);

 Criterion crit2 = Restrictions.ilike(“firstName”,searchText.trim(), MatchMode.START);

Criterion staffSearchCriterion = Restrictions.or(crit1, crit2); 

criteria.add(staffSearchCriterion);

Please find hbm.xml file used for this post, for your refrence: entity-name

Posted in Hibernate | Leave a Comment »

Parent Child Join With Criteria & DetachedCriteria using HibernateCallback

Posted by Pankil Patel on September 26, 2011

How to join parent table to child table using Criteria Query???

Please find attachment for solution:

ParentChildWithCriteriaJoin

 

Posted in Hibernate | Leave a Comment »

IT-Return

Posted by Pankil Patel on July 28, 2011

CreateDigitalSignature

Rename the downloded doc to CreateDigitalSignature.zip

Posted in IT-Return-India | Leave a Comment »

hbm.xml many-to-one & one-to-many Example

Posted by Pankil Patel on July 13, 2011

Example of many-to-one & one-to-many hbm.xml mapping

Mapping

Mapping

Posted in Hibernate | Leave a Comment »

Which JSF you like???

Posted by Pankil Patel on July 11, 2011

Posted in JSF | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.