⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 recordingdb.properties

📁 此程序都是企业级 的数据库开发程序 全面揭示了JAVA对数据库的操作
💻 PROPERTIES
字号:
##########################################################
# Properties to map Recording objects 
# to an Oracle database

####################
# These properties define the connection

DataMapperClass=org.jlf.dataMap.jdbcMap.JDBCDataMapper

ConnectionProperties.DriverClass=oracle.jdbc.driver.OracleDriver
ConnectionProperties.DatabaseURL=jdbc:oracle:thin:@dbserver:1521:database
ConnectionProperties.user=scott
ConnectionProperties.password=tiger


# SQL statements to create a recording
Recording.criteriaKey.createStatement.sqlStatement=\
    insert into RECORDINGS ( \
        RECORDING_ID, \
        RECORDING_TITLE, \
        RECORDING_ARTIST, \
        CATALOG_NUMBER, \
        LIST_PRICE, \
        VERSION) \
    values ( \
        RECORDINGS_SEQ.NEXTVAL, \
        {RECORDING_TITLE}, \
        {RECORDING_ARTIST}, \
        {CATALOG_NUMBER}, \
        {LIST_PRICE}, \
        {VERSION} )
        
Recording.criteriaKey.createStatement2.sqlStatement=\
    select RECORDINGS_SEQ.CURRVAL as RECORDING_ID \
      from DUAL
Recording.criteriaKey.createStatement2.isQuery=true
     
# SQL statement for a "findByTitle" search criteria
Recording.criteriaKey.findByTitle.sqlStatement=\
    select * \
      from RECORDINGS \
     where RECORDING_TITLE like {RECORDING_TITLE}

# SQL statement for a "findByArtist" search criteria
Recording.criteriaKey.findByArtist.sqlStatement=\
    select * \
      from RECORDINGS \
     where RECORDING_ARTIST like {RECORDING_ARTIST}

# SQL statement to optimistic lock a recording
Recording.criteriaKey.optimisticLockingStatement.sqlStatement=\
    select VERSION \
      from RECORDINGS \
     where RECORDING_ID = {RECORDING_ID} \
       and VERSION = {VERSION}

# SQL statement to update a recording
Recording.criteriaKey.updateStatement.sqlStatement=\
    update RECORDINGS set \
        RECORDING_TITLE = {RECORDING_TITLE}, \
        RECORDING_ARTIST = {RECORDING_ARTIST}, \
        CATALOG_NUMBER = {CATALOG_NUMBER}, \
        LIST_PRICE = {LIST_PRICE}, \
        VERSION = VERSION + 1 \
    where RECORDING_ID = {RECORDING_ID}

# Retrieves the reset VERSION
Recording.criteriaKey.updateStatement2.sqlStatement=\
    select VERSION \
      from RECORDINGS \
     where RECORDING_ID = {RECORDING_ID}
Recording.criteriaKey.updateStatement2.isQuery=true
     
# SQL statement to delete a recording
Recording.criteriaKey.deleteStatement.sqlStatement=\
    delete from RECORDINGS \
          where RECORDING_ID = {RECORDING_ID}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -