@@ -75,24 +75,24 @@ public synchronized void init() {
7575
7676 retrieveStatement = session .prepare (select ()
7777 .from (keyspace , TABLE )
78- .where (eq ("recipient" , bindMarker ("recipient" ))));
78+ .where (eq ("recipient" , bindMarker ())));
7979
8080 insertStatement = session .prepare (insertInto (keyspace , TABLE )
81- .value ("recipient" , bindMarker ("recipient" ))
82- .value ("time" , bindMarker ("time" ))
83- .value ("sender" , bindMarker ("sender" ))
84- .value ("body" , bindMarker ("body" )));
81+ .value ("recipient" , bindMarker ())
82+ .value ("time" , bindMarker ())
83+ .value ("sender" , bindMarker ())
84+ .value ("body" , bindMarker ()));
8585
8686 deleteStatement = session .prepare (delete ().from (keyspace , TABLE )
87- .where (eq ("recipient" , bindMarker ("recipient" ))));
87+ .where (eq ("recipient" , bindMarker ())));
8888
8989 initialized = true ;
9090 }
9191
9292 @ Override public Collection <MailboxMessage > getMessages (String recipient ) throws MailboxException {
9393 try {
9494 BoundStatement statement = new BoundStatement (retrieveStatement );
95- statement .setString ("recipient" , recipient );
95+ statement .setString (0 , recipient );
9696 ResultSet result = session .execute (statement );
9797
9898 Collection <MailboxMessage > messages = new ArrayList <MailboxMessage >();
@@ -114,10 +114,10 @@ public synchronized void init() {
114114 UUID time = UUIDs .startOf (message .getDate ().getTime ());
115115
116116 BoundStatement statement = new BoundStatement (insertStatement );
117- statement .setString ("recipient" , message .getRecipient ());
118- statement .setUUID ("time" , time );
119- statement .setString ("sender" , message .getSender ());
120- statement .setString ("body" , message .getBody ());
117+ statement .setString (0 , message .getRecipient ());
118+ statement .setUUID (1 , time );
119+ statement .setString (2 , message .getSender ());
120+ statement .setString (3 , message .getBody ());
121121
122122 session .execute (statement );
123123 return time ;
@@ -129,7 +129,7 @@ public synchronized void init() {
129129 @ Override public void clearMailbox (String recipient ) throws MailboxException {
130130 try {
131131 BoundStatement statement = new BoundStatement (deleteStatement );
132- statement .setString ("recipient" , recipient );
132+ statement .setString (0 , recipient );
133133 session .execute (statement );
134134 } catch (Exception e ) {
135135 throw new MailboxException (e );
0 commit comments