Kamidu Sachith 9 years ago
commit 3dceccc8c5

@ -61,7 +61,6 @@ public class WindowsFeatureDAOImpl implements MobileFeatureDAO {
stmt.setString(3, mobileFeature.getDescription()); stmt.setString(3, mobileFeature.getDescription());
stmt.executeUpdate(); stmt.executeUpdate();
status = true; status = true;
status = true;
} catch (SQLException e) { } catch (SQLException e) {
throw new WindowsFeatureManagementDAOException( throw new WindowsFeatureManagementDAOException(
"Error occurred while adding windows feature '" + "Error occurred while adding windows feature '" +
@ -135,7 +134,7 @@ public class WindowsFeatureDAOImpl implements MobileFeatureDAO {
Connection conn; Connection conn;
try { try {
conn = WindowsDAOFactory.getConnection(); conn = WindowsDAOFactory.getConnection();
String sql = "DELETE FROM WIN_FEATURE WHERE FEATURE_ID = ?"; String sql = "DELETE FROM WIN_FEATURE WHERE ID = ?";
stmt = conn.prepareStatement(sql); stmt = conn.prepareStatement(sql);
stmt.setInt(1, mblFeatureId); stmt.setInt(1, mblFeatureId);
stmt.execute(); stmt.execute();
@ -179,7 +178,7 @@ public class WindowsFeatureDAOImpl implements MobileFeatureDAO {
Connection conn; Connection conn;
try { try {
conn = WindowsDAOFactory.getConnection(); conn = WindowsDAOFactory.getConnection();
String sql = "SELECT FEATURE_ID, CODE, NAME, DESCRIPTION FROM WIN_FEATURE WHERE ID = ?"; String sql = "SELECT ID, CODE, NAME, DESCRIPTION FROM WIN_FEATURE WHERE ID = ?";
stmt = conn.prepareStatement(sql); stmt = conn.prepareStatement(sql);
stmt.setInt(1, mblFeatureId); stmt.setInt(1, mblFeatureId);
rs = stmt.executeQuery(); rs = stmt.executeQuery();
@ -210,7 +209,7 @@ public class WindowsFeatureDAOImpl implements MobileFeatureDAO {
Connection conn; Connection conn;
try { try {
conn = WindowsDAOFactory.getConnection(); conn = WindowsDAOFactory.getConnection();
String sql = "SELECT FEATURE_ID, CODE, NAME, DESCRIPTION FROM WIN_FEATURE WHERE CODE = ?"; String sql = "SELECT ID, CODE, NAME, DESCRIPTION FROM WIN_FEATURE WHERE CODE = ?";
stmt = conn.prepareStatement(sql); stmt = conn.prepareStatement(sql);
stmt.setString(1, mblFeatureCode); stmt.setString(1, mblFeatureCode);
rs = stmt.executeQuery(); rs = stmt.executeQuery();
@ -247,7 +246,7 @@ public class WindowsFeatureDAOImpl implements MobileFeatureDAO {
List<MobileFeature> features = new ArrayList<>(); List<MobileFeature> features = new ArrayList<>();
try { try {
conn = WindowsDAOFactory.getConnection(); conn = WindowsDAOFactory.getConnection();
String sql = "SELECT FEATURE_ID, CODE, NAME, DESCRIPTION FROM WIN_FEATURE"; String sql = "SELECT ID, CODE, NAME, DESCRIPTION FROM WIN_FEATURE";
stmt = conn.prepareStatement(sql); stmt = conn.prepareStatement(sql);
rs = stmt.executeQuery(); rs = stmt.executeQuery();
MobileFeature mobileFeature; MobileFeature mobileFeature;

@ -39,7 +39,7 @@ public class WindowsPluginConstants {
public static final String DEVICE_NAME = "DEVICE_NAME"; public static final String DEVICE_NAME = "DEVICE_NAME";
//Properties related to WIN_FEATURE table //Properties related to WIN_FEATURE table
public static final String WINDOWS_FEATURE_ID = "FEATURE_ID"; public static final String WINDOWS_FEATURE_ID = "ID";
public static final String WINDOWS_FEATURE_CODE = "CODE"; public static final String WINDOWS_FEATURE_CODE = "CODE";
public static final String WINDOWS_FEATURE_NAME = "NAME"; public static final String WINDOWS_FEATURE_NAME = "NAME";
public static final String WINDOWS_FEATURE_DESCRIPTION = "DESCRIPTION"; public static final String WINDOWS_FEATURE_DESCRIPTION = "DESCRIPTION";

@ -22,9 +22,9 @@
-- Table `WIN_FEATURE` -- Table `WIN_FEATURE`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `WIN_FEATURE` ( CREATE TABLE IF NOT EXISTS `WIN_FEATURE` (
`FEATURE_ID` INT NOT NULL AUTO_INCREMENT, `ID` INT NOT NULL AUTO_INCREMENT,
`CODE` VARCHAR(45) NOT NULL, `CODE` VARCHAR(45) NOT NULL,
`NAME` VARCHAR(100) NULL, `NAME` VARCHAR(100) NULL,
`DESCRIPTION` VARCHAR(200) NULL, `DESCRIPTION` VARCHAR(200) NULL,
PRIMARY KEY (`FEATURE_ID`) PRIMARY KEY (`ID`)
); );

@ -23,12 +23,11 @@ ENGINE = InnoDB;
-- Table `WIN_FEATURE` -- Table `WIN_FEATURE`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `WIN_FEATURE` ( CREATE TABLE IF NOT EXISTS `WIN_FEATURE` (
`FEATURE_ID` INT NOT NULL AUTO_INCREMENT, `ID` INT NOT NULL AUTO_INCREMENT,
`DEVICE_TYPE` VARCHAR(45) NOT NULL,
`CODE` VARCHAR(45) NULL, `CODE` VARCHAR(45) NULL,
`NAME` VARCHAR(100) NULL, `NAME` VARCHAR(100) NULL,
`DESCRIPTION` VARCHAR(200) NULL, `DESCRIPTION` VARCHAR(200) NULL,
PRIMARY KEY (`FEATURE_ID`)) PRIMARY KEY (`ID`))
ENGINE = InnoDB; ENGINE = InnoDB;

@ -24,7 +24,6 @@ CREATE TABLE WIN_DEVICE (
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE WIN_FEATURE ( CREATE TABLE WIN_FEATURE (
ID INT NOT NULL, ID INT NOT NULL,
DEVICE_TYPE VARCHAR(45) NOT NULL,
CODE VARCHAR(45) NOT NULL, CODE VARCHAR(45) NOT NULL,
NAME VARCHAR(100) NOT NULL, NAME VARCHAR(100) NOT NULL,
DESCRIPTION VARCHAR(200) NULL, DESCRIPTION VARCHAR(200) NULL,

@ -23,7 +23,6 @@ CREATE TABLE IF NOT EXISTS WIN_DEVICE (
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS WIN_FEATURE ( CREATE TABLE IF NOT EXISTS WIN_FEATURE (
ID SERIAL NOT NULL, ID SERIAL NOT NULL,
DEVICE_TYPE VARCHAR(45) NOT NULL,
CODE VARCHAR(45) NULL, CODE VARCHAR(45) NULL,
NAME VARCHAR(100) NULL, NAME VARCHAR(100) NULL,
DESCRIPTION VARCHAR(200) NULL, DESCRIPTION VARCHAR(200) NULL,

Loading…
Cancel
Save