hibenate 프로필 관리 부자 상속 관계

25999 단어 Hibernate설정 관리
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
	"-//Hibernate/Hibernate Mapping DTD//EN"
	"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

<hibernate-mapping package="com.nstc.fbcm.model">
	<class name="FbBusiness" table="FB_BUSINESS">
		<id
			column="BID"
			name="Bid"
			type="integer"
		>
			<generator class="assigned" />
		</id>
		<property
			column="AMOUNT"
			length="15"
			name="Amount"
			not-null="true"
			type="big_decimal"
		 />
		 
		<property
			column="AMOUNT1"
			length="15"
			name="AmountTotal"
			not-null="true"
			type="big_decimal"
		 />
		<property
			column="STATE"
			length="22"
			name="State"
			not-null="true"
			type="integer"
		 />
		<property
			column="COMPLEXCODE"
			length="512"
			name="Complexcode"
			not-null="false"
			type="string"
		 />
		<property
			column="SUB_STATE"
			length="22"
			name="SubState"
			not-null="false"
			type="integer"
		 />
		<property
			column="SIGN_DATE"
			length="7"
			name="SignDate"
			not-null="false"
			type="date"
		 />
		<property
			column="CREATE_TIME"
			length="7"
			name="CreateTime"
			not-null="true"
			type="java.util.Date"  
		 />
		<property
			column="CONTRACT_NO"
			length="32"
			name="ContractNo"
			not-null="true"
			type="string"
		 />
		<property
			column="INPUTOR"
			length="100"
			name="Inputor"
			not-null="false"
			type="string"
		 />
		 <property
			column="INPUTOR_ID"
			length="22"
			name="InputorId"
			not-null="false"
			type="integer"
		 />
		 <property
			column="BRNO"
			length="32"
			name="BrNo"
			not-null="false"
			type="string"
		 />
		<property
			column="LAST_UPDATE_TIME"
			length="7"
			name="LastUpdateTime"
			not-null="false"
			type="java.util.Date"
		 />
		<property
			column="APPROVE_MEMO"
			length="1024"
			name="ApproveMemo"
			not-null="false"
			type="string"
		 />
		<property
			column="START_DATE"
			length="7"
			name="StartDate"
			not-null="true"
			type="date"
		 />
		<many-to-one
			class="com.nstc.fbcc.model.CorporationPO"
			name="Debtor"
			not-null="true"
		>
			<column name="DEBTOR" />
		</many-to-one>
		 
		 
		<property
			column="REMARK"
			length="1024"
			name="Remark"
			not-null="false"
			type="string"
		 />
		<property
			column="MATURITY"
			length="7"
			name="Maturity"
			not-null="true"
			type="date"
		 />

		<many-to-one
			class="FbCurrency"
			name="Currency"
			not-null="true"
		>
			<column name="CURRENCY_NO" />
		</many-to-one>
		<many-to-one
			class="FbBizType"
			name="BizType"
			not-null="true"
		>
			<column name="BIZ_TYPE" />
		</many-to-one>
		
		<map name="Properties" 
			table="FB_BUSINESS_PROPERTIES" 
			lazy="false" 
			cascade="none" 
			inverse="true" 
		>
			<key column="BID"/>
			<index column="PROP_KEY" type="string"/>
			<composite-element class="FbBussProperty">
				<property
					column="PROP_VALUE"
					length="256"
					name="PropValue"
					not-null="true"
					type="string"
		 		/>
				<property
					column="PROP_NAME"
					length="128"
					name="PropName"
					not-null="false"
					type="string"
		 		/>
   			</composite-element>
		</map> 

		<joined-subclass name="FbSuperContract" table="FB_SUPER_CONTRACTS">
			<key column="BID" />

			<property
				column="REFILL_METHOD"
				length="22"
				name="RefillMethod"
				not-null="true"
				type="integer"
			 />
			<property
				column="MULTI_CURRENCY"
				length="22"
				name="MultiCurrency"
				not-null="true"
				type="boolean"
			 />
			<property
				column="BIZ_TYPE_ACUITY"
				length="22"
				name="BizTypeAcuity"
				not-null="true"
				type="integer"
			 />
			<property
				column="LATEST_START_DATE"
				length="7"
				name="LatestStartDate"
				not-null="false"
				type="date"
			 />
			<property
				column="AMOUNT_MODE"
				length="22"
				name="AmountMode"
				not-null="true"
				type="integer"
			 />
			<property
				column="DATE_MODE"
				length="22"
				name="DateMode"
				not-null="true"
				type="integer"
			 />
			<property
				column="FC_AMOUNT"
				length="15"
				name="FcAmount"
				not-null="false"
				type="big_decimal"
			 />
			 <property
				column="RATE"
				length="10"
				name="Rate"
				not-null="false"
				type="big_decimal"
			 />
			 <property
				column="ISFLOATRATE"
				length="22"
				name="IsFloatRate"
				not-null="false"
				type="integer"
			 />
			 <property
				column="FREEDAY"
				length="4"
				name="FreeDay"
				not-null="false"
				type="string"
			 />
			 <property
				column="FREESTARTDATE"
				length="7"
				name="FreeStartDate"
				not-null="false"
				type="java.util.Date"
			 />
			 <property
				column="FREEENDDATE"
				length="7"
				name="FreeEndDate"
				not-null="false"
				type="java.util.Date"
			 />
			 <property
				column="SURETY_CODE"
				length="22"
				name="SuretyCode"
				not-null="false"
				type="string"
			 />
			 <property
				column="SUPPLYBANK"
				length="22"
				name="SupplyBank"
				not-null="false"
				type="integer"
			 />
			 <property
				column="FINANCETERM"
				length="22"
				name="FinanceTerm"
				not-null="false"
				type="integer"
			 />

			<set
				cascade="delete-orphan"      
				inverse="true"
				lazy="false"
				name="SuperItems"
			>
				<key column="BID" />
				<one-to-many class="FbCreditItem" />
			</set>

			<set
				cascade="delete-orphan"      
				inverse="true"
				lazy="false"
				name="ManageLogs"
			>
				<key column="SUPER_BID" />
				<one-to-many class="FbManageUseLog" />
			</set>

			<set
				cascade="delete-orphan"      
				inverse="true"
				lazy="false"
				name="GroupBanks"
			>
				<key column="SUPER_BID" />
				<one-to-many class="FbGroupBank" />
			</set>
			
			<set
				inverse="true"
				lazy="true"
				name="FbContracts"
				table="FB_SUPER_MAP"
			>
				<key column="SUPER_BID" />
				<many-to-many class="FbContract" column="BID" />
			</set>

		</joined-subclass>
		<joined-subclass name="FbContract" table="FB_CONTRACTS">
			<key column="BID" />

			<property
				column="IN_SUIT"
				length="22"
				name="InSuit"
				not-null="true"
				type="integer"
			 />
			 <property
				column="ISSPLIT"
				length="22"
				name="isSplit"
				not-null="false"
				type="integer"
			 />
			 <property
				column="FINANCETERM"
				length="22"
				name="FinanceTerm"
				not-null="false"
				type="integer"
			 />
			 <property
				column="SELLMODE"
				length="22"
				name="SellMode"
				not-null="false"
				type="integer"
			 />
			 <property
				column="BUYOUT"
				length="22"
				name="BuyOut"
				type="integer"
			 />
			<property
				column="MAIN_CONTRACT_AMOUNT"
				length="15"
				name="MainContractAmount"
				not-null="false"
				type="big_decimal"
			 />
			<property
				column="MAIN_CURRENCY"
				length="15"
				name="MainCurrency"
				not-null="false"
				type="string"
			 />
			<property
				column="PROPORTION"
				length="15"
				name="Proportion"
				not-null="false"
				type="big_decimal"
			 />
			<property
				column="DESCRIPTION"
				length="2000"
				name="Description"
				not-null="false"
				type="string"
			 />
			<property
				column="GUARANTEE_TYPE"
				length="22"
				name="GuaranteeType"
				not-null="false"
				type="integer"
			 />
			<property
				column="GUARANTEE_USE"
				length="2000"
				name="GuaranteeUse"
				not-null="false"
				type="string"
			 />
			<property
				column="PAYMENT_TERM"
				length="2000"
				name="PaymentTerm"
				not-null="false"
				type="string"
			 />
			<property
				column="NORMRATE_RULE"
				length="22"
				name="NormrateRule"
				not-null="false"
				type="integer"
			 />
			<property
				column="NORMRATE_RULE_MONTH"
				length="22"
				name="NormrateRuleMonth"
				not-null="false"
				type="integer"
			 />
			<property
				column="NORMRATE_RULE_DAY"
				length="22"
				name="NormrateRuleDay"
				not-null="false"
				type="integer"
			 />
			 <property
				column="SURETY_TYPES"
				length="200"
				name="SuretyTypes"
				type="string"
			 />
			 <property
				column="OP_SURETY_TYPES"
				length="200"
				name="OpSuretyTypes"
				type="string"
			 />
			 <property
				column="OP_SURETY_REMARK"
				length="1000"
				name="OpSuretyRemark"
				type="string"
			 />
			 <property
				column="RISK_EXPOSURE"
				length="1000"
				name="RiskExposure"
				type="string"
			 />
			<property
				column="LOAN_TYPE"
				length="22"
				name="LoanType"
				not-null="false"
				type="integer"
			 />
			 <property
				column="SUPPLY_BANK_NAME"
				length="64"
				name="SupplyBankName"
				not-null="false"
				type="string"
			 />
			 <component name="InterestParam" class="FbInterestParam" >
				<property
					column="REPAY_CAPITAL"
					length="22"
					name="RepayCapital"
					not-null="true"
					type="integer"
			 	/>
				<property
					column="INTREST_PERIOD"
					length="22"
					name="IntrestPeriod"
					not-null="true"
					type="integer"
				 />
				<property
					column="INTREST_DAY"
					length="22"
					name="IntrestDay"
					not-null="false"
					type="integer"
			 	/>
				<property
					column="PERIOD_BASE"
					length="22"
					name="PeriodBase"
					not-null="true"
					type="integer"
			 	/>
				<property
					column="PERIOD_FREEDAY"
					length="4"
					name="PeriodFreeday"
					not-null="false"
					type="string"
			 	/>
				<property
					column="ENTIRE_FREEDAY"
					length="4"
					name="EntireFreeday"
					not-null="false"
					type="string"
			 	/>
				<property
					column="PERIOD_TYPE"
					length="22"
					name="PeriodType"
					not-null="false"
					type="string"
			 	/>
			 </component>
		<many-to-one
			class="com.nstc.fbcc.model.CorporationPO"
			name="Warrantee"
			not-null="false"
		>
			<column name="WARRANTEE" />
		</many-to-one>

		<many-to-one
			class="com.nstc.fbcm.model.FbGroupBank"
			name="GroupBank"
			not-null="false"
		>
			<column name="GROUPBANK" />
		</many-to-one>

			 
			<property
				column="HANDLE_METHOD"
				length="22"
				name="HandleMethod"
				not-null="false"
				type="integer"
			 />
		<many-to-one
			class="com.nstc.fbcc.model.CorporationPO"
			name="Consigner"
			not-null="false"
		>
			<column name="CONSIGNER" />
		</many-to-one>
			<property
				column="FLOATING_FREQ"
				length="22"
				name="FloatingFreq"
				not-null="false"
				type="integer"
			 />
			<property
				column="SURETY_RATE"
				length="8"
				name="SuretyRate"
				not-null="false"
				type="big_decimal"
			 />
			<property
				column="REPAY_CHANNEL"
				length="2"
				name="RepayChannel"
				not-null="false"
				type="string"
			 />
			<property
				column="EX_RATE"
				length="12"
				name="ExRate"
				not-null="false"
				type="big_decimal"
			 />
			<property
				column="RECTIFY_RATE"
				length="8"
				name="RectifyRate"
				not-null="false"
				type="big_decimal"
			 />
			<property
				column="MULTI_LENDING"
				length="22"
				name="MultiLending"
				not-null="true"
				type="boolean"
			 />
			<property
				column="IS_FLOATING_RATE"
				length="22"
				name="IsFloatingRate"
				not-null="true"
				type="boolean"
			 />
			<property
				column="CORRELATION_NUM2"
				length="32"
				name="CorrelationNum2"
				not-null="false"
				type="string"
			 />
			<property
				column="OLD_CONTARCT_NO"
				length="32"
				name="OldContarctNo"
				not-null="false"
				type="string"
			 />
			<property
				column="FLOATING_METHOD"
				length="1"
				name="FloatingMethod"
				not-null="false"
				type="string"
			 />
		<many-to-one
			class="com.nstc.fbcc.model.CorporationPO"
			name="Broker"
			not-null="false"
		>
			<column name="BROKER" />
		</many-to-one>
		<many-to-one
			class="com.nstc.fbcc.model.UniversalCodePO"
			name="Beneficiary"
			not-null="false"
		>
			<column name="BENEFICIARY" />
		</many-to-one>

			<property
				column="FIVE_LEVEL"
				length="22"
				name="FiveLevel"
				not-null="false"
				type="integer"
			 />

			<property
				column="NOT_WITHHOLDING"
				length="22"
				name="NotWithholding"
				not-null="true"
				type="integer"
			 />

			<property
				column="DISCOUNT_MODE"
				length="22"
				name="DiscountMode"
				not-null="false"
				type="integer"
			 />
			<property
				column="CORRELATION_NUM1"
				length="32"
				name="CorrelationNum1"
				not-null="false"
				type="string"
			 />
			 
			<property
				column="CYC_LOAN"
				length="22"
				name="CycLoan"
				not-null="true"
				type="boolean"
			 />
			 
			 <property
				column="PAGENUM"
				length="22"
				name="PageNum"
				not-null="false"
				type="integer"
			 />

			 <property
				column="SELF_SUPPORT"
				length="22"
				name="SelfSupport"
				type="integer"
			 />

			 <property
				column="FIX_PLAN"
				length="22"
				name="FixPlan"
				not-null="false"
				type="integer"
			 />

			 <property
				column="RMSRATETYPE"
				length="22"
				name="RmsRateType"
				not-null="false"
				type="integer"
			 />

			 <property
				column="NORMRATEID"
				length="22"
				name="NormId"
				not-null="false"
				type="integer"
			 />
			 
			 <property
				column="NORMRATE_METHOD"
				length="22"
				name="NormMethod"
				not-null="false"
				type="integer"
			 />
			 
			 <property
				column="NORMRATE_FALG"
				length="22"
				name="NormFalg"
				not-null="false"
				type="big_decimal"
			 />
			<set
				inverse="true"
				lazy="false"
				name="IntrestRate"
				order-by="RATE_TYPE asc, EFT_DATE desc"
			>
				<key column="BID" />
				<one-to-many class="FbIntrestRate" />
			</set>
			
			<set
				inverse="true"
				lazy="true"
				name="SpecialActions"
			>
				<key column="BID" />
				<one-to-many class="FbSpecialAction" />
			</set>
			<set
				inverse="true"
				lazy="true"
				name="Lawsuits"
			>
				<key column="BID" />
				<one-to-many class="FbLawsuit" />
			</set>

			<set
				cascade="delete"      
				inverse="true"
				lazy="false"
				name="DiscountNotes"
			>
				<key column="BID" />
				<one-to-many class="FbDiscountNote" />
			</set>
			<set
				inverse="true"
				lazy="true"
				name="FivelevelLogs"
			>
				<key column="BID" />
				<one-to-many class="FbFivelevelLog" />
			</set>
			<set
				inverse="true"
				lazy="false"
				name="FbBaoGoods"
			>
				<key column="BID" />
				<one-to-many class="FbBaoGoods" />
			</set>
			<set
				inverse="true"
				lazy="false"
				name="FbLedgers"
			>
				<key column="BID" />
				<one-to-many class="FbLedger" />
			</set>
            <map name="Accounts" 
            	table="FB_ACCOUNTS" 
            	lazy="false" 
            	cascade="none"  
            	inverse="true" 
            >
               <key column="BID"/>
               <index column="ACCOUNT_TYPE" type="string"/>
               <element column="ACCOUNT_NO" type="string" not-null="false"/>
            </map>   
			<set
				cascade="save-update"     
				inverse="true"
				lazy="false"
				name="Intentions"
			>
				<key column="BID" />
				<one-to-many class="FbIntention" />
			</set>
			<set
				cascade="none" 
				lazy="true"
				name="SuperContracts"
				table="FB_SUPER_MAP"
			>
				<key column="BID" />
				<many-to-many class="FbSuperContract" column="SUPER_BID" />
			</set>
<!--
		<set
			cascade="none" 
			inverse="true"
			lazy="false"
			name="ChargeRates"
		>
			<key column="BID" />
			<one-to-many class="FbChargeRate" />
		</set>
-->		
			<set
				inverse="true"
				lazy="false"
				name="Lendings"
				order-by="BID asc, START_DATE asc"
			>
				<key column="BID" />
				<one-to-many class="FbLending" />
			</set>
			<set
				inverse="true"
				lazy="true"
				name="Plans"
				order-by="BID asc, PLAN_DATE asc"
			>
				<key column="BID" />
				<one-to-many class="FbPlan" />
			</set>
			<set
				inverse="true"
				lazy="true"
				name="ChargeLogs"
				order-by="BID asc, CHARGE_DATE asc"
			>
				<key column="BID" />
				<one-to-many class="FbChargeLog" />
			</set>
		</joined-subclass>
	</class>
</hibernate-mapping>

좋은 웹페이지 즐겨찾기