CloneSet180


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
29330.984class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
129373
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeByte.java
229372
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeLong.java
329373
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeShort.java
Next
Last
Clone Instance
1
Line Count
29
Source Line
373
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeByte.java

/*
 * DataBase-related functions
 */
/**
 * On input from the DB, read the data from the ResultSet into the appropriate
 * type of object to be stored in the table cell.
 */
public Object readResultSet(ResultSet rs, int index, boolean limitDataRead) throws java.sql.SQLException {
  byte data = rs.getByte(index);
  if (rs.wasNull()) {
    return null;
  }
  else {
    return Byte.valueOf(data);
  }
}

/**
 * When updating the database, generate a string form of this object value
 * that can be used in the WHERE clause to match the value in the database.
 * A return value of null means that this column cannot be used in the WHERE
 * clause, while a return of "null" (or "is null", etc) means that the column
 * can be used in the WHERE clause and the value is actually a null value.
 * This function must also include the column label so that its output
 * is of the form:
 *      "columnName = value"
 * or
 *      "columnName is null"
 * or whatever is appropriate for this column in the database.
 */
public String getWhereClauseValue(Object value, ISQLDatabaseMetaData md) {
  if (value == null || value.toString() == null || value.toString().length() == 0)
    return _colDef.getLabel() + " IS NULL";
  else
    return _colDef.getLabel() + "=" + value.toString();
}


Next
Previous
Clone Instance
2
Line Count
29
Source Line
372
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeLong.java

/*
 * DataBase-related functions
 */
/**
 * On input from the DB, read the data from the ResultSet into the appropriate
 * type of object to be stored in the table cell.
 */
public Object readResultSet(ResultSet rs, int index, boolean limitDataRead) throws java.sql.SQLException {
  long data = rs.getLong(index);
  if (rs.wasNull()) {
    return null;
  }
  else {
    return Long.valueOf(data);
  }
}

/**
 * When updating the database, generate a string form of this object value
 * that can be used in the WHERE clause to match the value in the database.
 * A return value of null means that this column cannot be used in the WHERE
 * clause, while a return of "null" (or "is null", etc) means that the column
 * can be used in the WHERE clause and the value is actually a null value.
 * This function must also include the column label so that its output
 * is of the form:
 *      "columnName = value"
 * or
 *      "columnName is null"
 * or whatever is appropriate for this column in the database.
 */
public String getWhereClauseValue(Object value, ISQLDatabaseMetaData md) {
  if (value == null || value.toString() == null || value.toString().length() == 0)
    return _colDef.getLabel() + " IS NULL";
  else
    return _colDef.getLabel() + "=" + value.toString();
}


First
Previous
Clone Instance
3
Line Count
29
Source Line
373
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeShort.java

/*
 * DataBase-related functions
 */
/**
 * On input from the DB, read the data from the ResultSet into the appropriate
 * type of object to be stored in the table cell.
 */
public Object readResultSet(ResultSet rs, int index, boolean limitDataRead) throws java.sql.SQLException {
  short data = rs.getShort(index);
  if (rs.wasNull()) {
    return null;
  }
  else {
    return Short.valueOf(data);
  }
}

/**
 * When updating the database, generate a string form of this object value
 * that can be used in the WHERE clause to match the value in the database.
 * A return value of null means that this column cannot be used in the WHERE
 * clause, while a return of "null" (or "is null", etc) means that the column
 * can be used in the WHERE clause and the value is actually a null value.
 * This function must also include the column label so that its output
 * is of the form:
 *      "columnName = value"
 * or
 *      "columnName is null"
 * or whatever is appropriate for this column in the database.
 */
public String getWhereClauseValue(Object value, ISQLDatabaseMetaData md) {
  if (value == null || value.toString() == null || value.toString().length() == 0)
    return _colDef.getLabel() + " IS NULL";
  else
    return _colDef.getLabel() + "=" + value.toString();
}


Clone AbstractionParameter Count: 3Parameter Bindings

/*
         * DataBase-related functions
         */
/**
          * On input from the DB, read the data from the ResultSet into the appropriate
          * type of object to be stored in the table cell.
          */
public Object readResultSet(ResultSet rs, int index, boolean limitDataRead) throws java.sql.SQLException {
   [[#variable18d10ae0]] data = rs. [[#variable18d10a40]](index);
  if (rs.wasNull()) {
    return null;
  }
  else {
    return [[#variable18d109c0]].valueOf(data);
  }
}

/**
         * When updating the database, generate a string form of this object value
         * that can be used in the WHERE clause to match the value in the database.
         * A return value of null means that this column cannot be used in the WHERE
         * clause, while a return of "null" (or "is null", etc) means that the column
         * can be used in the WHERE clause and the value is actually a null value.
         * This function must also include the column label so that its output
         * is of the form:
         *      "columnName = value"
         * or
         *      "columnName is null"
         * or whatever is appropriate for this column in the database.
         */
public String getWhereClauseValue(Object value, ISQLDatabaseMetaData md) {
  if (value == null || value.toString() == null || value.toString().length() == 0)
    return _colDef.getLabel() + " IS NULL";
  else
    return _colDef.getLabel() + "=" + value.toString();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#18d10ae0]]
byte 
12[[#18d10ae0]]
long 
13[[#18d10ae0]]
short 
21[[#18d10a40]]
getByte 
22[[#18d10a40]]
getLong 
23[[#18d10a40]]
getShort 
31[[#18d109c0]]
Byte 
32[[#18d109c0]]
Long 
33[[#18d109c0]]
Short