BrightSide Workbench Full Report + Source Code
org.turro.attach.search.AttachHeadlessResults Class Reference

Public Member Functions

 AttachHeadlessResults ()
 
void markAll ()
 
java.util.List< AttachmentgetAttachmentList ()
 
java.util.Set< String > getPathList (String currPath)
 
void addCriteria (WhereClause wc)
 
String getAttachPath ()
 
void setAttachPath (String attachPath)
 
String getAttachValue ()
 
void setAttachValue (String attachValue)
 
boolean isCkExactPath ()
 
void setCkExactPath (boolean ckExactPath)
 
boolean isCkNonValidated ()
 
void setCkNonValidated (boolean ckNonValidated)
 

Static Public Member Functions

static long getCountAttachments (String root)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 32 of file AttachHeadlessResults.java.

Constructor & Destructor Documentation

◆ AttachHeadlessResults()

org.turro.attach.search.AttachHeadlessResults.AttachHeadlessResults ( )

Definition at line 37 of file AttachHeadlessResults.java.

37  {
38  }

Member Function Documentation

◆ addCriteria()

void org.turro.attach.search.AttachHeadlessResults.addCriteria ( WhereClause  wc)

Definition at line 65 of file AttachHeadlessResults.java.

65  {
66 
67  if(Strings.isEmpty(attachValue)) {
68  return;
69  }
70 
71  wc = SQLHelper.getWhereClause(wc, new String[] {
72  "attachment.fileName"
73  }, (attachValue == null ? "" : attachValue.replaceAll("\\*", "%")));
74 
75  if(ckNonValidated) {
76  wc.addClause("and attachment.validated = false");
77  }
78 
79  if(attachPath != null) {
80  wc.addClause("and UCASE(attachment.path) " +
81  (ckExactPath ? "=" : "like") +
82  " UCASE(:path)");
83  wc.addNamedValue("path", attachPath);
84  }
85 
86  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAttachmentList()

java.util.List<Attachment> org.turro.attach.search.AttachHeadlessResults.getAttachmentList ( )

Definition at line 45 of file AttachHeadlessResults.java.

45  {
46  Dao dao = new AttachPU();
47  WhereClause wc = new WhereClause();
48  wc.addClause("select distinct attachment from Attachment as attachment");
49  wc.addClause("where 1=1");
50  addCriteria(wc);
51  wc.addClause("order by attachment.fileName, attachment.modification DESC");
52  return new AttachmentList(dao.getResultList(wc), true);
53  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAttachPath()

String org.turro.attach.search.AttachHeadlessResults.getAttachPath ( )

Definition at line 88 of file AttachHeadlessResults.java.

88  {
89  return attachPath;
90  }

◆ getAttachValue()

String org.turro.attach.search.AttachHeadlessResults.getAttachValue ( )

Definition at line 96 of file AttachHeadlessResults.java.

96  {
97  return attachValue;
98  }

◆ getCountAttachments()

static long org.turro.attach.search.AttachHeadlessResults.getCountAttachments ( String  root)
static

Definition at line 120 of file AttachHeadlessResults.java.

120  {
121  Dao dao = new AttachPU();
122  return (Long) dao.getSingleResult(
123  " select count(attachment) " +
124  " from Attachment as attachment" +
125  " where attachment.path like '" + root + "/%'");
126  }
Here is the call graph for this function:

◆ getPathList()

java.util.Set<String> org.turro.attach.search.AttachHeadlessResults.getPathList ( String  currPath)

Definition at line 55 of file AttachHeadlessResults.java.

55  {
56  Dao dao = new AttachPU();
57  WhereClause wc = new WhereClause();
58  wc.addClause("select distinct attachment.path from Attachment as attachment");
59  wc.addClause("where 1=1");
60  addCriteria(wc);
61  wc.addClause("order by attachment.path");
62  return new PathSet(dao.getResultList(wc), currPath, true);
63  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCkExactPath()

boolean org.turro.attach.search.AttachHeadlessResults.isCkExactPath ( )

Definition at line 104 of file AttachHeadlessResults.java.

104  {
105  return ckExactPath;
106  }

◆ isCkNonValidated()

boolean org.turro.attach.search.AttachHeadlessResults.isCkNonValidated ( )

Definition at line 112 of file AttachHeadlessResults.java.

112  {
113  return ckNonValidated;
114  }

◆ markAll()

void org.turro.attach.search.AttachHeadlessResults.markAll ( )

Definition at line 40 of file AttachHeadlessResults.java.

40  {
41  attachValue = "*";
42  ckNonValidated = false;
43  }

◆ setAttachPath()

void org.turro.attach.search.AttachHeadlessResults.setAttachPath ( String  attachPath)

Definition at line 92 of file AttachHeadlessResults.java.

92  {
93  this.attachPath = attachPath;
94  }
Here is the caller graph for this function:

◆ setAttachValue()

void org.turro.attach.search.AttachHeadlessResults.setAttachValue ( String  attachValue)

Definition at line 100 of file AttachHeadlessResults.java.

100  {
101  this.attachValue = attachValue;
102  }
Here is the caller graph for this function:

◆ setCkExactPath()

void org.turro.attach.search.AttachHeadlessResults.setCkExactPath ( boolean  ckExactPath)

Definition at line 108 of file AttachHeadlessResults.java.

108  {
109  this.ckExactPath = ckExactPath;
110  }
Here is the caller graph for this function:

◆ setCkNonValidated()

void org.turro.attach.search.AttachHeadlessResults.setCkNonValidated ( boolean  ckNonValidated)

Definition at line 116 of file AttachHeadlessResults.java.

116  {
117  this.ckNonValidated = ckNonValidated;
118  }

The documentation for this class was generated from the following file: