Kawai Wiki

Rev

Rev 69 | Rev 79 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 69 Rev 78
Line 8... Line 8...
8
import org.kawai.dao.jdbc.JdbcPageDAO;
8
import org.kawai.dao.jdbc.JdbcPageDAO;
9
import org.kawai.dao.jdbc.JdbcUserDAO;
9
import org.kawai.dao.jdbc.JdbcUserDAO;
10
import org.kawai.model.Language;
10
import org.kawai.model.Language;
11
import org.kawai.model.Page;
11
import org.kawai.model.Page;
12
import org.kawai.model.Preview;
12
import org.kawai.model.Preview;
-
 
13
import org.kawai.model.Revision;
13
import org.kawai.model.User;
14
import org.kawai.model.User;
14
import org.mentabean.DBTypes;
15
import org.mentabean.DBTypes;
15
import org.mentabean.util.SQLUtils;
16
import org.mentabean.util.SQLUtils;
16
import org.mentawai.action.LogoutAction;
17
import org.mentawai.action.LogoutAction;
17
import org.mentawai.ajax.renderer.JsonRenderer;
18
import org.mentawai.ajax.renderer.JsonRenderer;
Line 125... Line 126...
125
                        .field("title", DBTypes.STRING)
126
                        .field("title", DBTypes.STRING)
126
                        .field("body", DBTypes.STRING)
127
                        .field("body", DBTypes.STRING)
127
                        .field("createdOn", "created_on", DBTypes.NOW_ON_INSERT_TIMESTAMP)
128
                        .field("createdOn", "created_on", DBTypes.NOW_ON_INSERT_TIMESTAMP)
128
                        .field("name", DBTypes.STRING)
129
                        .field("name", DBTypes.STRING)
129
                        .field("languageId", "language_id", DBTypes.INTEGER);
130
                        .field("languageId", "language_id", DBTypes.INTEGER);
-
 
131
               
-
 
132
                bean(Revision.class, "Revisions")
-
 
133
                .pk("id", DBTypes.AUTOINCREMENT)
-
 
134
                .field("userId", "user_id", DBTypes.INTEGER)
-
 
135
                .field("newTitle", "new_title", DBTypes.STRING)
-
 
136
                .field("newBody", "new_body", DBTypes.STRING)
-
 
137
                .field("oldTitle", "old_title", DBTypes.STRING)
-
 
138
                .field("oldBody", "old_body", DBTypes.STRING)          
-
 
139
                .field("createdOn", "created_on", DBTypes.AUTOTIMESTAMP)
-
 
140
                .field("name", DBTypes.STRING)
-
 
141
                .field("languageId", "language_id", DBTypes.INTEGER)
-
 
142
                .field("revision", DBTypes.INTEGER);
-
 
143
130
        }
144
        }
131
       
145
       
132
    @Override
146
    @Override
133
    public void loadLists() {
147
    public void loadLists() {
134
                addLocalizedLists(connHandler, "groups", "languages");
148
                addLocalizedLists(connHandler, "groups", "languages");