SELECT <includerefid="Base_Column_List"></include> FROM DATA_FIELD_LIST
<where>
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<iftest="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<iftest="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
<iftest="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
<iftest="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
<iftest="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
<iftest="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</where>
</select>
<selectid="selectCount"resultType="Integer">
SELECT COUNT(1) FROM DATA_FIELD_LIST
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<iftest="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
<iftest="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
<iftest="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
<iftest="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
<iftest="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<selectid="selectList"resultMap="BaseResultMap">
SELECT <choose><whentest="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><includerefid="Base_Column_List"></include></otherwise></choose> FROM DATA_FIELD_LIST
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<iftest="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
<iftest="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
<iftest="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
<iftest="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
<iftest="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<selectid="selectMaps"resultType="HashMap">
SELECT <choose><whentest="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><includerefid="Base_Column_List"></include></otherwise></choose> FROM DATA_FIELD_LIST
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<iftest="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
<iftest="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
<iftest="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
<iftest="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
<iftest="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<selectid="selectObjs"resultType="Object">
SELECT <choose><whentest="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><includerefid="Base_Column_List"></include></otherwise></choose> FROM DATA_FIELD_LIST
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<iftest="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
<iftest="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
<iftest="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
<iftest="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
<iftest="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<selectid="selectPage"resultMap="BaseResultMap">
SELECT <choose><whentest="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><includerefid="Base_Column_List"></include></otherwise></choose> FROM DATA_FIELD_LIST
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<iftest="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
<iftest="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
<iftest="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
<iftest="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
<iftest="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<selectid="selectMapsPage"resultType="HashMap">
SELECT <choose><whentest="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><includerefid="Base_Column_List"></include></otherwise></choose> FROM DATA_FIELD_LIST
<where>
<iftest="ew!=null">
<iftest="ew.entity!=null">
<iftest="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<iftest="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
<iftest="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
<iftest="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
<iftest="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
<iftest="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
<iftest="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</if>
<iftest="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<iftest="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<iftest="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
SUBSTR(LISTAGG(DFLT.DATA_TAG || ',') WITHIN GROUP(ORDER BY DF.DATA_FIELD),0,LENGTH(LISTAGG(DFLT.DATA_TAG || ',') WITHIN GROUP(ORDER BY DF.DATA_FIELD))-1)
FROM DATA_FIELD DF
INNER JOIN DATA_FIELD_LIST DFL ON DF.HANDLE = DFL.DATA_FIELD_BO
LEFT JOIN DATA_FIELD_LIST_T DFLT ON DFL.HANDLE = DFLT.DATA_FIELD_LIST_BO AND DFLT.LOCALE = #{locale}
<where>
<iftest="dataField != null">
<iftest="dataField.handle != null and dataField.handle != ''">
DF.HANDLE = #{dataField.handle}
</if>
<iftest="dataField.site != null and dataField.site != ''">
AND DF.SITE = #{dataField.site}
</if>
<iftest="dataField.dataField != null and dataField.dataField != ''">
AND DF.DATA_FIELD = #{dataField.dataField}
</if>
</if>
<iftest="dataField.dataValue != null and dataField.dataValue.size > 0">