2008/12/1 John Chien <[EMAIL PROTECTED]> > Dear sir: > > This is my first time of using HashMap. > I defined the following structure and statement. > > Are they correct ? > What is the key for the HashMap ? > > <resultMap id="facilityIdBEAN" class="java.util.HashMap"> > <result property="facilityId" column="facility_id", > <result property="countyId" column="county", > <result property="facilityType" column="type", > <result property="seqNo" column="seq_no" > </resultMap> > > > <statement id="getCountyFacilityMap" parameterClass="java.util.String" > resultMap="facilityIdBEAN"> > SELECT LPAD(COUNTY_ID, 3,'0') || LPAD(FAC_TYPE, 2,'0') || > LPAD(FAC_ID_NUMBER, 4,'0') as facility_id, > COUNTY_ID > as > county, > FAC_TYPE > > as type, > FAC_ID_NUMBER > as > seq_no > FROM EH.BETS_FACILITY > WHERE COUNTY_ID = #value# > </statement> > > Thanks, >
The map keys will be your property fields you defined in your facilityIdBEAN resultMap.