/**
  * Method 'insert'
  *
  * @param dto
  * @return SessionSexualRelationshipTypePk
  */
 @Transactional
 public SessionSexualRelationshipTypePk insert(SessionSexualRelationshipType dto) {
   jdbcTemplate.update(
       "INSERT INTO "
           + getTableName()
           + " ( sessionSexualRelationshipTypeId, sessionReference, sexualRelationshipTypeId, dateCreated, createdBy, dateModified, modifiedBy, status ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ? )",
       dto.getSessionSexualRelationshipTypeId(),
       dto.getSessionReference(),
       dto.isSexualRelationshipTypeIdNull() ? null : dto.getSexualRelationshipTypeId(),
       dto.getDateCreated(),
       dto.getCreatedBy(),
       dto.getDateModified(),
       dto.getModifiedBy(),
       dto.isStatusNull() ? null : dto.getStatus());
   return dto.createPk();
 }
 /** Updates a single row in the SessionSexualRelationshipType table. */
 @Transactional
 public void update(SessionSexualRelationshipTypePk pk, SessionSexualRelationshipType dto)
     throws SessionSexualRelationshipTypeDaoException {
   jdbcTemplate.update(
       "UPDATE "
           + getTableName()
           + " SET sessionSexualRelationshipTypeId = ?, sessionReference = ?, sexualRelationshipTypeId = ?, dateCreated = ?, createdBy = ?, dateModified = ?, modifiedBy = ?, status = ? WHERE sessionSexualRelationshipTypeId = ?",
       dto.getSessionSexualRelationshipTypeId(),
       dto.getSessionReference(),
       dto.getSexualRelationshipTypeId(),
       dto.getDateCreated(),
       dto.getCreatedBy(),
       dto.getDateModified(),
       dto.getModifiedBy(),
       dto.getStatus(),
       pk.getSessionSexualRelationshipTypeId());
 }