예제 #1
0
 /**
  * 删除数据表字段
  *
  * @param columnId
  */
 @Transactional(readOnly = false)
 public void deleteTableColumn(Long columnId) {
   TableColumn column = tableColumnDao.get(columnId);
   column.setDeleted(true);
   tableColumnDao.save(column);
   //		tableColumnDao.delete(columnId);
 }
예제 #2
0
 /**
  * 字段保存
  *
  * @param tableColumn
  */
 @Transactional(readOnly = false)
 public void saveColumn(TableColumn tableColumn, boolean canChange) {
   tableColumn.setCompanyId(ContextUtils.getCompanyId());
   tableColumnDao.save(tableColumn);
   //		if(!canChange && !tableColumn.getDataTable().getExistedTable()){
   //			jdbcDao.addTableColumn(tableColumn.getDataTable().getTableName(), tableColumn);
   //		}
 }
예제 #3
0
 /**
  * 批量保存字段
  *
  * @param dataTable
  */
 @Transactional(readOnly = false)
 public void saveTableColumns(DataTable dataTable) {
   List<Object> list = JsonParser.getFormTableDatas(TableColumn.class);
   for (Object obj : list) {
     TableColumn column = (TableColumn) obj;
     column.setCompanyId(ContextUtils.getCompanyId());
     column.setDataTableId(dataTable.getId());
     tableColumnDao.save(column);
   }
 }
예제 #4
0
 public List<TableColumn> getDeleteColumnByColumnName(String columnName, Long dataTableId) {
   return tableColumnDao.getDeleteColumnByColumnName(columnName, dataTableId);
 }
예제 #5
0
 public List<TableColumn> getTableColumnByDataTableId(Long dataTableId) {
   return tableColumnDao.getTableColumnByDataTableId(dataTableId);
 }
예제 #6
0
 public List<TableColumn> getUnCompanyAllTableColumnByDataTableId(Long dataTableId) {
   return tableColumnDao.getUnCompanyAllTableColumnByDataTableId(dataTableId);
 }
예제 #7
0
 public TableColumn getTableColumnByColName(Long dataTableId, String columnName) {
   return tableColumnDao.getTableColumnByColName(dataTableId, columnName);
 }
예제 #8
0
 /**
  * 彻底删除对应数据表所有的字段
  *
  * @param dataTableId
  */
 @Transactional(readOnly = false)
 public void deleteAllTableColumns(Long dataTableId) {
   tableColumnDao.deleteAllTableColumns(dataTableId);
 }