com.avian.birds.db
Class LastNameBird

java.lang.Object
  extended by javax.swing.SwingWorker<java.lang.String,java.lang.String>
      extended by com.avian.birds.basebirds.AbstractBasicBird
          extended by com.avian.birds.basebirds.StdBird
              extended by com.avian.birds.db.LastNameBird
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<java.lang.String>, java.util.concurrent.RunnableFuture<java.lang.String>

public class LastNameBird
extends StdBird

Gets all the Last Names from the Last_name db and writes each one of them separately as food morsels to tupletree


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
javax.swing.SwingWorker.StateValue
 
Field Summary
 java.lang.String dbDriver
          Xmv annotated variable that allows you to select the database driver at runtime.
 java.lang.String dbLogin
          Xmv annotated variable that allows you to select the login name at runtime.
 java.lang.String dbName
          Xmv annotated variable that allows you to select the database at runtime.
 java.lang.String dbPlaceholder3
          Xmv annotated variable that is currently unused.
 java.lang.String dbPW
          Xmv annotated variable that allows you to select the password at runtime.
 java.lang.String dbSQLStatement
          Xmv annotated variable that allows you to define the SQL statement at runtime.
 java.lang.String dbURL
          Xmv annotated variable that allows you to change the database at runtime Requires a matching setter method.
 
Fields inherited from class com.avian.birds.basebirds.StdBird
foodFromTree, healthStatus, jbRefStart, jlRefLastAte, jtaRefHistory, jtfRefHealth, mts, myTupleTree, nts, sampleXmv, startButtonText
 
Fields inherited from class com.avian.birds.basebirds.AbstractBasicBird
bhf, bif, birdDesc, birdHistory, birdName, bof, eatsFood, hatchTime, historyFileName, inputFileName, lastAte, levelOfInfo, lifeTime, napLength, outputFileName, stamina, stopNow, storesFood
 
Constructor Summary
LastNameBird()
           
 
Method Summary
 void digest()
          Overrides the StdBird digest method just to skip the time delay in StdBird.digest() whose goal is to simulate actual work being done
 void eatFood()
          Every Bird must eat food to stay alive and this method provides the instructions to eat from a database.
 void setDbDriver(java.lang.String dbOther)
          Copies the value in the database driver name field displayed in the Aviary and writes it to the dbDriver variable.
 void setDbLogin(java.lang.String dbLogin)
          Copies the value in the db login field displayed in the Aviary and writes it to the dbLogin variable.
 void setDbName(java.lang.String dbName)
          Copies the value in the database name field displayed in the Aviary and writes it to the dbName variable.
 void setDbPlaceholder3(java.lang.String dbSecondOther)
          Copies the value in the placeholder field displayed in the Aviary and writes it to the dbPlaceholder variable.
 void setDbPW(java.lang.String dbPW)
          Copies the value in the db password field displayed in the Aviary and writes it to the dbPW variable.
 void setDbSQLStatement(java.lang.String dbSQLStatement)
          Copies the value in the SQL Statement field displayed in the Aviary and writes it to the dbStatement variable.
 void setDbURL(java.lang.String dbURL)
          Copies the value in the database URL field displayed in the Aviary and writes it to the dbURL variable.
 void storeFood()
          Puts the digested food out for other Birds to eat.
 
Methods inherited from class com.avian.birds.basebirds.StdBird
checkAge, done, setHealthRef, setHealthStatus, setHistoryAreaRef, setJlRefLastAte, setStartButtonRef, setStartButtonText, setTupleTree
 
Methods inherited from class com.avian.birds.basebirds.AbstractBasicBird
addToBirdHistory, doInBackground, getAuxFood, getBirdDescription, getBirdHistory, getBirdName, getEatsFood, getHatchTime, getHistoryFileName, getInputFileName, getLastAte, getLevelOfInfo, getLifeTime, getNameOfFoodToStore, getNapLength, getOutputFileName, getStamina, isStopNow, setBhf, setBif, setBirdDesc, setBirdHistory, setBirdName, setBof, setEatsFood, setHatchTime, setHistoryFileName, setInputFileName, setLevelOfInfo, setLevelOfInfo, setLifeTime, setNapLength, setOutputFileName, setStamina, setStopNow, setStoresFood
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbURL

public java.lang.String dbURL
Xmv annotated variable that allows you to change the database at runtime Requires a matching setter method.


dbLogin

public java.lang.String dbLogin
Xmv annotated variable that allows you to select the login name at runtime. Requires a matching setter method.


dbPW

public java.lang.String dbPW
Xmv annotated variable that allows you to select the password at runtime. Requires a matching setter method.


dbSQLStatement

public java.lang.String dbSQLStatement
Xmv annotated variable that allows you to define the SQL statement at runtime. Requires a matching setter method.


dbName

public java.lang.String dbName
Xmv annotated variable that allows you to select the database at runtime. Requires a matching setter method.


dbDriver

public java.lang.String dbDriver
Xmv annotated variable that allows you to select the database driver at runtime. Requires a matching setter method.


dbPlaceholder3

public java.lang.String dbPlaceholder3
Xmv annotated variable that is currently unused. Requires a matching setter method.

Constructor Detail

LastNameBird

public LastNameBird()
Method Detail

setDbURL

public void setDbURL(java.lang.String dbURL)
Copies the value in the database URL field displayed in the Aviary and writes it to the dbURL variable. Requires a matching Xmv annotated variable.

Parameters:
dbURL - is the String value that is entered into this field in Aviary.

setDbLogin

public void setDbLogin(java.lang.String dbLogin)
Copies the value in the db login field displayed in the Aviary and writes it to the dbLogin variable. Requires a matching Xmv annotated variable.

Parameters:
dbLogin - is the String value that is entered into this field in Aviary.

setDbPW

public void setDbPW(java.lang.String dbPW)
Copies the value in the db password field displayed in the Aviary and writes it to the dbPW variable. Requires a matching Xmv annotated variable.

Parameters:
dbPW - is the String value that is entered into this field in Aviary.

setDbSQLStatement

public void setDbSQLStatement(java.lang.String dbSQLStatement)
Copies the value in the SQL Statement field displayed in the Aviary and writes it to the dbStatement variable. Requires a matching Xmv annotated variable.

Parameters:
dbSQLStatement - is the String value that is entered into this field in Aviary.

setDbName

public void setDbName(java.lang.String dbName)
Copies the value in the database name field displayed in the Aviary and writes it to the dbName variable. Requires a matching Xmv annotated variable.

Parameters:
dbName - is the String value that is entered into this field in Aviary.

setDbDriver

public void setDbDriver(java.lang.String dbOther)
Copies the value in the database driver name field displayed in the Aviary and writes it to the dbDriver variable. Requires a matching Xmv annotated variable.

Parameters:
dbOther - is the String value that is entered into this field in Aviary.

setDbPlaceholder3

public void setDbPlaceholder3(java.lang.String dbSecondOther)
Copies the value in the placeholder field displayed in the Aviary and writes it to the dbPlaceholder variable. Requires a matching Xmv annotated variable.

Parameters:
dbSecondOther - is the String value that is entered into this field in Aviary.

eatFood

public void eatFood()
Every Bird must eat food to stay alive and this method provides the instructions to eat from a database.

Overrides:
eatFood in class StdBird

digest

public void digest()
Overrides the StdBird digest method just to skip the time delay in StdBird.digest() whose goal is to simulate actual work being done

Overrides:
digest in class StdBird

storeFood

public void storeFood()
Puts the digested food out for other Birds to eat. The name for the digested food comes from the storeFood variable, which is the "key" that will be used to store the work packet (object). This object is the "value" in a pair. The next Birds will eat (get) this food using the name used here.

Overrides:
storeFood in class StdBird