Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can we use bulkUpdateByAnd method of Interface OfBizDelegator for active objects entities ?

Ramesh Udari1 May 24, 2015

Hi, 

We have created entities by using active objects and we did not find a option to do bulk update on active object entities.  What we observed that there is a method "bulkUpdateByAnd()" of nterface OfBizDelegator in JIRA for doing bulk update in entities in jira. So, can we use this method for entities which have been created through active objects ?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2015

No.  OfBizDelegator does not know anything about active objects entities, and if you tried to use it with something it doesn't know about, it would throw an exception.

If you are trying to get more advanced / flexible functionality than what AO offers, the direction we're looking at here is to use QueryDSL for this.

https://bitbucket.org/atlassian/atlassian-pocketknife-querydsl

How this interacts with AO and any caching is outside my expertise, however.

 

Ramesh Udari1 May 24, 2015

Hi Chris, Thanks for you quick response on it. Could you please light me more on QueryDSL. How can i use QueryDSL in my plugin?. Note: We are using JIRA 5.0.2 version .

crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2015

You would need to use a newer version than that. Everything before JIRA 6.0 is officially end-of-life. QueryDSL is not something that we are actively promoting or writing documentation for -- it is simply one option that we are exploring internally and have had some success with. The information provided in that repository's README is all of the information I am aware of at this time. However, QueryDSL itself is a publicly available library, and there is plenty of inforrmation available for it online.

Ramesh Udari1 May 24, 2015

Hi Chris, Thanks for your valuable inputs on it. Can we connect JIRA database directly through JAVA JDBC API and update tables ?

crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 24, 2015

Not if you want it to keep working. Our database schema is not considered part of the API, and you should never manipulate the database directly except as directed to by support.

Ramesh Udari1 May 25, 2015

Hi Chris, I have around 1 lack records in that table and iterating each records through is time consuming issue. As these table has been created with active object api and does contain only our custom data, how will it impact JIRA system if i connect these tables directly with JAVA JDBC API and do bulk updates on these tables ?

crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 26, 2015

I'm going to assume you actually mean 1 lakh = 1,00,000 in Indian numbering systems, or 100,000 as it would be written in the systems I'm more familiar with? Most people outside of India have probably never heard of lakh and crore, so it's best to write out what you actually mean. In any case, if it is for your own custom system and you want to use raw JDBC to read from the AO tables, I see no immediate problem with this. Just be aware that it increases the chances of problems if you move from one database vendor to another and may make it harder for Atlassian's support team to assist you if you run into trouble. If you intend to share your code with other Atlassian customers, then I definitely do not recommend using JDBC directly, as doing so consistently with AO's table naming convention is not easy.

TAGS
AUG Leaders

Atlassian Community Events