long to org.apache.james.mailbox.MessageUid
No. of Instances - 244
No. of Commits - 2
No. of Projects - {'james-project'}
Hierarchy/Composition: Composition
Primitive Info: -
NameSpace: Jdk -> Internal
Mapping:
- Cascading Type Change (Different)
- SortedMap<Long,MaildirMessageName> to SortedMap<MessageUid,MaildirMessageName>
- TreeMap<Long,MaildirMessageName> to TreeMap<MessageUid,MaildirMessageName>
- Long to MessageUid
- SearchQuery.NumericRange to SearchQuery.UidRange
- Long to MessageUid
- SearchQuery.NumericRange to SearchQuery.UidRange
- SearchQuery.NumericRange to SearchQuery.UidRange
- SearchQuery.NumericRange to SearchQuery.UidRange
- SearchQuery.NumericRange to SearchQuery.UidRange
- SearchQuery.NumericRange to SearchQuery.UidRange
- Long to MessageUid
- IdRange to UidRange
- SortedMap<Long,MaildirMessageName> to SortedMap<MessageUid,MaildirMessageName>
- TreeMap<Long,MaildirMessageName> to TreeMap<MessageUid,MaildirMessageName>
- Add or Remove Method invocation
- getEntityManager().createNamedQuery("findMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from) to getEntityManager().createNamedQuery("findMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from.asLong())
- to to to.asLong()
- getEntityManager().createNamedQuery("deleteDeletedMessagesInMailboxWithUID").setParameter("idParam",mailboxId.getRawId()).setParameter("uidParam",uid) to getEntityManager().createNamedQuery("deleteDeletedMessagesInMailboxWithUID").setParameter("idParam",mailboxId.getRawId()).setParameter("uidParam",from.asLong())
- messageRowKey(mailboxId,from - 1) to previousMessageRowKey(mailboxId,from)
- getEntityManager().createNamedQuery("findDeletedMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from).setParameter("toParam",to) to getEntityManager().createNamedQuery("findDeletedMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from.asLong()).setParameter("toParam",to.asLong())
- String.valueOf(uid) to String.valueOf(uid.asLong())
- String.valueOf(uid) to String.valueOf(uid.asLong())
- uid to uid.asLong()
- recentMessageUids.contains(Long.valueOf(uid)) to recentMessageUids.contains(uid)
- uid to from.asLong()
- String.valueOf(uid) to String.valueOf(uid.asLong())
- String.valueOf(uid) to String.valueOf(uid.asLong())
- getEntityManager().createNamedQuery("findMessagesInMailboxWithUID").setParameter("idParam",mailboxId.getRawId()).setParameter("uidParam",uid).setMaxResults(1) to getEntityManager().createNamedQuery("findMessagesInMailboxWithUID").setParameter("idParam",mailboxId.getRawId()).setParameter("uidParam",from.asLong()).setMaxResults(1)
- getEntityManager().createNamedQuery("findDeletedMessagesInMailboxAfterUID").setParameter("idParam",mailboxId.getRawId()).setParameter("uidParam",uid) to getEntityManager().createNamedQuery("findDeletedMessagesInMailboxAfterUID").setParameter("idParam",mailboxId.getRawId()).setParameter("uidParam",from.asLong())
- getValue to get
- UID to UID.asLong()
- uid to uid.asLong()
- uid to uid.asLong()
- Bytes.toBytes(value) to Bytes.toBytes(value.asLong())
- String.valueOf(uid) to String.valueOf(uid.asLong())
- String.valueOf(theUid) to String.valueOf(theUid.asLong())
- lines.add(String.valueOf(uid) + " " + name) to lines.add(String.valueOf(uid.asLong()) + " " + name)
- lines.add(String.valueOf(theUid) + " " + file) to lines.add(String.valueOf(theUid.asLong()) + " " + file)
- mailboxNode.addNode(String.valueOf(uid),"nt:file") to mailboxNode.addNode(String.valueOf(uid.asLong()),"nt:file")
- getEntityManager().createNamedQuery("findMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from) to getEntityManager().createNamedQuery("findMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from.asLong())
- to to to.asLong()
- gte(IMAP_UID,uid) to gte(IMAP_UID,uid.asLong())
- eq(IMAP_UID,uid) to eq(IMAP_UID,uid.asLong())
- result to result.asLong()
- result to result.asLong()
- getEntityManager().createNamedQuery("deleteDeletedMessagesInMailboxAfterUID").setParameter("idParam",mailboxId.getRawId()).setParameter("uidParam",uid) to getEntityManager().createNamedQuery("deleteDeletedMessagesInMailboxAfterUID").setParameter("idParam",mailboxId.getRawId()).setParameter("uidParam",from.asLong())
- messageRowKey(mailboxId,from - 1) to previousMessageRowKey(mailboxId,messageUid)
- String.valueOf(theUid) to String.valueOf(theUid.asLong())
- getEntityManager().createNamedQuery("findDeletedMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from).setParameter("toParam",to) to getEntityManager().createNamedQuery("findDeletedMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from.asLong()).setParameter("toParam",to.asLong())
- getEntityManager().createNamedQuery("deleteDeletedMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from).setParameter("toParam",to) to getEntityManager().createNamedQuery("deleteDeletedMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from.asLong()).setParameter("toParam",to.asLong())
- messageUid to messageUid.asLong()
- select(retrieveFields(fetchType)).from(TABLE_NAME).where(eq(MAILBOX_ID,mailboxId.asUuid())).and(gte(IMAP_UID,from)) to select(retrieveFields(fetchType)).from(TABLE_NAME).where(eq(MAILBOX_ID,mailboxId.asUuid())).and(gte(IMAP_UID,from.asLong()))
- lte(IMAP_UID,to) to lte(IMAP_UID,to.asLong())
- select(retrieveFields(fetchType)).from(TABLE_NAME).where(eq(MAILBOX_ID,mailboxId.asUuid())).and(gte(IMAP_UID,from)) to select(retrieveFields(fetchType)).from(TABLE_NAME).where(eq(MAILBOX_ID,mailboxId.asUuid())).and(gte(IMAP_UID,from.asLong()))
- lte(IMAP_UID,to) to lte(IMAP_UID,to.asLong())
- getEntityManager().createNamedQuery("findDeletedMessagesInMailboxWithUID").setParameter("idParam",mailboxId.getRawId()).setParameter("uidParam",uid).setMaxResults(1) to getEntityManager().createNamedQuery("findDeletedMessagesInMailboxWithUID").setParameter("idParam",mailboxId.getRawId()).setParameter("uidParam",from.asLong()).setMaxResults(1)
- getEntityManager().createNamedQuery("deleteDeletedMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from).setParameter("toParam",to) to getEntityManager().createNamedQuery("deleteDeletedMessagesInMailboxBetweenUIDs").setParameter("idParam",mailboxId.getRawId()).setParameter("fromParam",from.asLong()).setParameter("toParam",to.asLong())
- Rename Variable
- uid to from
- uid to from
- uid to from
- uid to from
- uid to from
- uid to messageUid
- uidFrom to minValue
- uidTo to maxValue
- uid to from
- uid to resultUid
- uid to from
- uid to from
- from to messageUid
- messageUid to from
- uid to from
- nextUid to uidNext
- uid to from
- uid to from
- Update Anonymous class
- { @Override public Void execute() throws MailboxException { File uidList=uidFile; FileReader fileReader=null; BufferedReader reader=null; PrintWriter writer=null; try { fileReader=new FileReader(uidList); reader=new BufferedReader(fileReader); String line=reader.readLine(); readUidListHeader(line); ArrayList<String> lines=new ArrayList<String>(); while ((line=reader.readLine()) != null) { if (uid == Long.valueOf(line.substring(0,line.indexOf(" ")))) line=String.valueOf(uid) + " " + messageName; lines.add(line); } writer=new PrintWriter(uidList); writer.println(createUidListHeader()); for ( String entry : lines) writer.println(entry); } catch ( IOException e) { throw new MailboxException("Unable to update msg with uid " + uid,e); } finally { IOUtils.closeQuietly(writer); IOUtils.closeQuietly(reader); IOUtils.closeQuietly(fileReader); } return null; } } to { @Override public Void execute() throws MailboxException { File uidList=uidFile; FileReader fileReader=null; BufferedReader reader=null; PrintWriter writer=null; try { fileReader=new FileReader(uidList); reader=new BufferedReader(fileReader); String line=reader.readLine(); readUidListHeader(line); ArrayList<String> lines=new ArrayList<String>(); while ((line=reader.readLine()) != null) { if (uid.equals(MessageUid.of(Long.valueOf(line.substring(0,line.indexOf(" ")))))) { line=String.valueOf(uid.asLong()) + " " + messageName; } lines.add(line); } writer=new PrintWriter(uidList); writer.println(createUidListHeader()); for ( String entry : lines) writer.println(entry); } catch ( IOException e) { throw new MailboxException("Unable to update msg with uid " + uid,e); } finally { IOUtils.closeQuietly(writer); IOUtils.closeQuietly(reader); IOUtils.closeQuietly(fileReader); } return null; } }
- { @Override public Long execute() throws MailboxException { File uidList=uidFile; long uid=-1; FileReader fileReader=null; BufferedReader reader=null; PrintWriter pw=null; try { if (uidList.isFile()) { fileReader=new FileReader(uidList); reader=new BufferedReader(fileReader); String line=reader.readLine(); if (line != null) readUidListHeader(line); ArrayList<String> lines=new ArrayList<String>(); while ((line=reader.readLine()) != null) lines.add(line); uid=getNextUid(); lines.add(String.valueOf(uid) + " " + name); messageCount++; pw=new PrintWriter(uidList); pw.println(createUidListHeader()); for ( String entry : lines) pw.println(entry); } else { if (!uidList.createNewFile()) throw new IOException("Could not create file " + uidList); String[] curFiles=curFolder.list(); String[] newFiles=newFolder.list(); messageCount=curFiles.length + newFiles.length; ArrayList<String> lines=new ArrayList<String>(); String[] allFiles=(String[])ArrayUtils.addAll(curFiles,newFiles); for ( String file : allFiles) { long theUid=getNextUid(); lines.add(String.valueOf(theUid) + " " + file); if (file.equals(name)) uid=theUid; } pw=new PrintWriter(uidList); pw.println(createUidListHeader()); for ( String line : lines) pw.println(line); } } catch ( IOException e) { throw new MailboxException("Unable to append msg",e); } finally { IOUtils.closeQuietly(pw); IOUtils.closeQuietly(reader); IOUtils.closeQuietly(fileReader); } if (uid == -1) { throw new MailboxException("Unable to append msg"); } else { return uid; } } } to { @Override public MessageUid execute() throws MailboxException { File uidList=uidFile; MessageUid uid=null; FileReader fileReader=null; BufferedReader reader=null; PrintWriter pw=null; try { if (uidList.isFile()) { fileReader=new FileReader(uidList); reader=new BufferedReader(fileReader); String line=reader.readLine(); if (line != null) readUidListHeader(line); ArrayList<String> lines=new ArrayList<String>(); while ((line=reader.readLine()) != null) lines.add(line); uid=getNextUid(); lines.add(String.valueOf(uid.asLong()) + " " + name); messageCount++; pw=new PrintWriter(uidList); pw.println(createUidListHeader()); for ( String entry : lines) pw.println(entry); } else { if (!uidList.createNewFile()) throw new IOException("Could not create file " + uidList); String[] curFiles=curFolder.list(); String[] newFiles=newFolder.list(); messageCount=curFiles.length + newFiles.length; ArrayList<String> lines=new ArrayList<String>(); String[] allFiles=(String[])ArrayUtils.addAll(curFiles,newFiles); for ( String file : allFiles) { MessageUid theUid=getNextUid(); lines.add(String.valueOf(theUid.asLong()) + " " + file); if (file.equals(name)) uid=theUid; } pw=new PrintWriter(uidList); pw.println(createUidListHeader()); for ( String line : lines) pw.println(line); } } catch ( IOException e) { throw new MailboxException("Unable to append msg",e); } finally { IOUtils.closeQuietly(pw); IOUtils.closeQuietly(reader); IOUtils.closeQuietly(fileReader); } if (uid == null) { throw new MailboxException("Unable to append msg"); } else { return uid; } } }
- Other
- uid to uid
- value.postValue() to value.postValue()
- uid to uid
- node.getProperty(UID_PROPERTY).getLong() to node.getProperty(UID_PROPERTY).getLong()
- ++lastUid to nextUid
- Wrap or Un-wrap
- Cascading Type Change (Similar)