Todo todo = new Todo(); todo.setSummary("This is a test"); todo.setDescription("This is a test");
@Path("/todo/{varX}/{varY}") @Produces({"application/xml", "application/json"}) public Todo whatEverNameYouLike(@PathParam("varX") String varX, @PathParam("varY") String varY) { Todo todo = new Todo(); todo.setSummary(varX); todo.setDescription(varY); return todo; }
Queue<Queue<Env<AttrContext>>> q = todo.groupByFile(); while (!q.isEmpty() && !shouldStop(CompileState.ATTR)) { generate(desugar(flow(attribute(q.remove())))); while (!todo.isEmpty()) generate(desugar(flow(attribute(todo.remove())))); break;
protected Enter(Context context) { context.put(enterKey, this); log = Log.instance(context); reader = ClassReader.instance(context); make = TreeMaker.instance(context); syms = Symtab.instance(context); chk = Check.instance(context); memberEnter = MemberEnter.instance(context); annotate = Annotate.instance(context); lint = Lint.instance(context); predefClassDef = make.ClassDef( make.Modifiers(PUBLIC), syms.predefClass.name, null, null, null, null); predefClassDef.sym = syms.predefClass; todo = Todo.instance(context); fileManager = context.get(JavaFileManager.class); }
/** Create the first round. */ Round(Context context, List<JCCompilationUnit> roots, List<ClassSymbol> classSymbols, Log.DeferredDiagnosticHandler deferredDiagnosticHandler) { this(context, 1, 0, 0, deferredDiagnosticHandler); this.roots = roots; genClassFiles = new HashMap<String,JavaFileObject>(); compiler.todo.clear(); // free the compiler's resources // The reverse() in the following line is to maintain behavioural // compatibility with the previous revision of the code. Strictly speaking, // it should not be necessary, but a javah golden file test fails without it. topLevelClasses = getTopLevelClasses(roots).prependList(classSymbols.reverse()); packageInfoFiles = getPackageInfoFiles(roots); findAnnotationsPresent(); }
Todo item = new Todo(); Intent i = new Intent(c, Details.class); i.putExtra("nazivTodoa", item.getTitle()); i.putExtra("datumTodoa", item.getRecordDate()); i.putExtra("idTodoa", item.getItemId());
public Env<AttrContext> poll() { if (size() == 0) return null; Env<AttrContext> env = contents.remove(0); if (contentsByFile != null) removeByFile(env); return env; }
Todo td = new Todo(); td.setId(c.getInt((c.getColumnIndex(KEY_ID)))); td.setNote((c.getString(c.getColumnIndex(KEY_TODO)))); td.setCreatedAt(c.getString(c.getColumnIndex(KEY_CREATED_AT)));
public class Main { public static void main(String[] args) {public static void main(String[] args) { ApplicationContext ctx = new AnnotationConfigApplicationContext(PersistenceContext.class); TodoRepository todoRepository = ctx.getBean(TodoRepository.class); Todo todo = new Todo(); todo.setId(1l); todo.setTitle("title"); System.out.println(todoRepository); // not null todoRepository.save(todo); } }
List<Todo> todoItem = new ArrayList<Todo>(); DataAdapter mDbHelper = new DataAdapter(urContext); mDbHelper.createDatabase(); mDbHelper.open(); Cursor cursor = mDbHelper.getTodoData(); if (cursor.moveToFirst()) { do { Todo todo = new Todo(); todo.setName(cursor.getString(1)); todo.setNote(cursor.getString(2)); todoItem.add(todo); } while (cursor.moveToNext()); } mDbHelper.close();
Todo todo = new Todo("34","34 - Summary Entered"); target.path("rest").path("todos").request().post(Entity.json(todo)); Response response = target.path("rest").path("todos").path(todo.getId()).request() .accept(MediaType.APPLICATION_XML).get(Response.class); System.out.println("\n Response Code is : "+ response.getStatus());
@POST @Produces(MediaType.TEXT_HTML) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public void newTodo( @FormParam("id") String id, @FormParam("summary") String summary, @FormParam("description") String description, @Context HttpServletResponse servletResponse ) throws IOException { Todo todo = new Todo(id,summary); if (description!=null){ todo.setDescription(description); } TodoDao.instance.getModel().put(id, todo); URI uri = uriInfo.getAbsolutePathBuilder().path(id).build(); Response.created(uri).build(); servletResponse.sendRedirect("../create_todo.html"); }
public boolean offer(Env<AttrContext> e) { if (contents.add(e)) { if (contentsByFile != null) addByFile(e); return true; } else { return false; } }
public void append(Env<AttrContext> env) { add(env); }
Queue<Queue<Env<AttrContext>>> q = todo.groupByFile(); while (!q.isEmpty() && !shouldStop(CompileState.ATTR)) { generate(desugar(flow(attribute(q.remove())))); while (!todo.isEmpty()) generate(desugar(flow(attribute(todo.remove())))); break;
protected Enter(Context context) { context.put(enterKey, this); log = Log.instance(context); reader = ClassReader.instance(context); make = TreeMaker.instance(context); syms = Symtab.instance(context); chk = Check.instance(context); memberEnter = MemberEnter.instance(context); annotate = Annotate.instance(context); lint = Lint.instance(context); names = Name.Table.instance(context); predefClassDef = make.ClassDef( make.Modifiers(PUBLIC), syms.predefClass.name, null, null, null, null); predefClassDef.sym = syms.predefClass; todo = Todo.instance(context); fileManager = context.get(JavaFileManager.class); }
/** Create the first round. */ Round(Context context, List<JCCompilationUnit> roots, List<ClassSymbol> classSymbols, Log.DeferredDiagnosticHandler deferredDiagnosticHandler) { this(context, 1, 0, 0, deferredDiagnosticHandler); this.roots = roots; genClassFiles = new HashMap<String,JavaFileObject>(); compiler.todo.clear(); // free the compiler's resources // The reverse() in the following line is to maintain behavioural // compatibility with the previous revision of the code. Strictly speaking, // it should not be necessary, but a javah golden file test fails without it. topLevelClasses = getTopLevelClasses(roots).prependList(classSymbols.reverse()); packageInfoFiles = getPackageInfoFiles(roots); findAnnotationsPresent(); }
todo.append(env);