1 package com.quantum.view.bookmark;
3 import com.quantum.sql.metadata.ObjectMetaData;
5 public class QueryNode extends TreeNode {
8 private static final int MAX_SIZE = 30;
10 public QueryNode(TreeNode parent, String query) {
15 public ObjectMetaData getMetaData() {
16 return null; //no metadata implementation for now
19 public String getQuery() {
23 public String getName() {
24 String name = this.query.trim();
25 boolean trimmed = false;
26 name = name.replace('\n', ' ');
27 name = name.replace('\f', ' ');
28 name = name.replace('\r', ' ');
29 name = name.replace('\t', ' ');
31 if (name.length() > MAX_SIZE) {
32 name = name.substring(0, MAX_SIZE);
36 name += "...->"; //$NON-NLS-1$
42 * @see com.quantum.view.bookmark.TreeNode#getChildren()
44 public Object[] getChildren() {
45 return BookmarkListNode.EMPTY_ARRAY;
49 * @see com.quantum.view.bookmark.TreeNode#hasChildren()
51 public boolean hasChildren() {
56 * @see com.quantum.view.bookmark.TreeNode#getImageName()
58 protected String getImageName() {
63 * @see com.quantum.view.bookmark.TreeNode#initializeChildren()
65 protected void initializeChildren() {